Ralf,
A possible solution would be to define
COMMAND = "GO "
That is a string of "GO" followed by the space character.
It makes your production
INPUT = COMMAND LETTER+;
Hope this helps
Anant
On Fri, 2005-07-01 at 10:48 +0200, HECKHAUSEN Ralf wrote:
I have a problem with the parser, or better the tokenizer. Below is a simplified example.
%header%
GRAMMARTYPE = "LL"
%tokens%
LETTER = <<[A-Z]>>
COMMAND = "GO"
SPACE = " "
%productions%
INPUT = COMMAND SPACE LETTER+;
The input "GO SOUTH" is parsed correctly, but with "GO SOGO" I get a parse error, because "GO" is not recognized as two letters anymore. It seems that whenever letters are defined as tokens, they may not occur in other context. But I am sure there is a way around this problem, can someone help me?
Cheers,
Ralf
_______________________________________________ Grammatica-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/grammatica-users
-- Anant Mistry Director of Infrastructure Technology Information Handling Services 15 Inverness Way East Englewood CO 80112 USA 303 397 2569 Confidentiality Notice: The information in this e-mail may be confidential and / or privileged. This e-mail is intended to be reviewed by only the individual or organization named in the e-mail address. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this e-mail and attachments, if any, or the information contained herein, is strictly prohibited. |
_______________________________________________ Grammatica-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/grammatica-users
