C,词汇 [英] C, lexical
问题描述
是否有可用的Lex代码描述如何扫描C程序?
我想
阅读与此相关的内容。我的一个理念是C如何处理
歧义,例如
,`a = x / * p;''或'a = x // * .. 。* / - 3;''(考虑到c99'的
` //'')。
提前感谢,
n。
Is there any Lex code available that describes how to scan C programs?
I''d like to
read someting related to this. One of my doubs is how C deals with
ambiguities,
for example, `a = x/*p;'' or `a = x//*...*/-3;'' (considering c99''s
`//'').
thanks in advance,
n.
推荐答案
" Lucas Zimmerman" <是ne ****** @ gmail.com>写道:
"Lucas Zimmerman" <ne******@gmail.com> wrote:
是否有任何Lex代码可用于描述如何扫描C程序?
我想阅读与此相关的内容。我的一个理念是C如何处理模棱两可的问题,例如,`a = x / * p;''或'a = x //*...*/- 3;'' (考虑到c99'
`//'')。
Is there any Lex code available that describes how to scan C programs?
I''d like to
read someting related to this. One of my doubs is how C deals with
ambiguities,
for example, `a = x/*p;'' or `a = x//*...*/-3;'' (considering c99''s
`//'').
嗯,这不是C99,但也许是一个很好的起点:< >
最好的问候
-
Irrwahn Grausewitz(ir*******@freenet.de)
欢迎来到clc: http://www.ungerhu.com/jxh/clc.welcome.txt
clc faq-列表: http://www.faqs.org/faqs/C -faq / faq /
clc常见答案: http ://benpfaff.org/writings/clc 。
Well, it''s not C99, but maybe a good starting point:
http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
Best Regards
--
Irrwahn Grausewitz (ir*******@freenet.de)
welcome to clc : http://www.ungerhu.com/jxh/clc.welcome.txt
clc faq-list : http://www.faqs.org/faqs/C-faq/faq/
clc frequent answers: http://benpfaff.org/writings/clc.
Irrw ahn Grausewitz写道:
Irrwahn Grausewitz wrote:
" Lucas Zimmerman" <是ne ****** @ gmail.com>写道:
"Lucas Zimmerman" <ne******@gmail.com> wrote:
是否有任何Lex代码可用于描述如何扫描C程序?
我想阅读与此相关的内容。我的一个理念是C如何处理模棱两可的问题,例如,`a = x / * p;''或'a = x //*...*/- 3;'' (考虑到c99'
`//'')。
Is there any Lex code available that describes how to scan C programs?
I''d like to
read someting related to this. One of my doubs is how C deals with
ambiguities,
for example, `a = x/*p;'' or `a = x//*...*/-3;'' (considering c99''s
`//'').
嗯,这不是C99,但也许是一个很好的起点:
< >
最好的问候
Well, it''s not C99, but maybe a good starting point:
http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
Best Regards
惊人的文件!非常感谢Irrwahn。
有趣的是`char x<:N:>;''在C中有效。这也是c99吗?
我还在学习C 3年后学习它!!总是有
的东西
了解这种语言。
再次感谢,
>
n。
Amazing document! thanks a lot Irrwahn.
Interesting how `char x<:N:>;'' is valid in C. Is this c99 too?
I''m still learning C after 3 years studying it!! There is always
something
new to know about this language.
thanks once again,
n.
Lucas Zimmerman写道:
Lucas Zimmerman wrote:
是否有任何可用的Lex代码描述如何扫描C程序?
我想阅读与此相关的内容。我的一个理念是C如何处理模棱两可的问题,例如,`a = x / * p;''或'a = x //*...*/- 3;'' (考虑到c99'
`//'')。
Is there any Lex code available that describes how to scan C programs?
I''d like to
read someting related to this. One of my doubs is how C deals with
ambiguities,
for example, `a = x/*p;'' or `a = x//*...*/-3;'' (considering c99''s
`//'').
这些不含糊,因为C指定了处理顺序。
第一个例子包含评论的开头。第二个例子
在C90中进行除法,片段a = x。在C99。
Thad
Those are not ambiguous because C specifies the processing order. The
first example contains the start of comment. The second example
performs a division in C90 and fragment "a = x" in C99.
Thad
这篇关于C,词汇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!