Related articles |
---|
[7 earlier articles] |
Re: detecting ambiguous grammars dlester@cs.man.ac.uk (2001-03-10) |
Re: detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-03-12) |
Re: detecting ambiguous grammars christian.bau@isltd.insignia.com (2001-03-22) |
Re: detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-03-26) |
Re: detecting ambiguous grammars joachim_d@gmx.de (Joachim Durchholz) (2001-03-26) |
Re: detecting ambiguous grammars cfc@world.std.com (Chris F Clark) (2001-03-27) |
Re: detecting ambiguous grammars genew@shuswap.net (2001-03-27) |
Re: detecting ambiguous grammars genew@shuswap.net (2001-03-27) |
Re: detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-03-31) |
Re: detecting ambiguous grammars cfc@world.std.com (Chris F Clark) (2001-03-31) |
Re: detecting ambiguous grammars kenarose@earthlink.net (Ken Rose) (2001-03-31) |
Re: detecting ambiguous grammars vbdis@aol.com (2001-03-31) |
Re: detecting ambiguous grammars joachim_d@gmx.de (Joachim Durchholz) (2001-04-04) |
[2 later articles] |
From: | genew@shuswap.net (Gene Wirchenko) |
Newsgroups: | comp.compilers |
Date: | 27 Mar 2001 23:45:16 -0500 |
Organization: | Compilers Central |
References: | 01-02-080 01-03-020 01-03-032 01-03-078 01-03-084 01-03-102 01-03-119 |
Keywords: | parse |
Posted-Date: | 27 Mar 2001 23:45:16 EST |
Thant Tessman <thant@acm.org> wrote:
[snip]
>There is another option. In lex, if a string of letters matches more
>than one rule, the rule that occurs first in the rule section is
>chosen. A grammar specification could work the same way. Although
>ambiguities wouldn't be explicitly enumerated, it is always clear how
>to disambiguate.
Another way of lexing is the way C does it. In general, C's
lexing goes for the longest token. Assuming the state is <looking for
a new token>, "/*" is one token "/*" not "/" + "*".
[snip]
Sincerely,
Gene Wirchenko
Return to the
comp.compilers page.
Search the
comp.compilers archives again.