[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:
But then if the ID really was "if" you would parse it as a
command instead of an ID.
Two things might help:
- you know more about the ID, like the number of characters, or
that it is always capitals or something.
- you use the context to help the parser work. For example,
if an ID was always followed by a colon, but colons weren't used
after commands then the parser would have no problem.
There may be other ways too - I'm no expert on this :-)
Andrew
At 05:27 PM 11/2/98 +0000, you wrote:
>Hi There,
>
>I'm just thinking if we have section called keyword to define the language
>keyword like
>Print,if,... etc and the Lexical generator give them the first priority.
>
>because I have found problem In grammar like this
>
>Helpers
>
> l =['A'-'Z'];
> d =['0'-'9'];
>
>Tokens
>
> Id= l (l | d)*
> if='if'
> .....
>
>
>the Lexical will peek the first one .
>
>
>an is there any way so I can use the parser with VB front end?
>
>
>thank you
>
>
>Husam Senussi
>Husam@Demon.net
>
- Follow-Ups:
- Re:
- From: stephen p spackman <stephen@acm.org>
- References:
- No Subject
- From: "Husam Senussi" <Husam@Demon.net>