record ::= ('!') key (':') valuekey ~ [\w]+value ~ [^\s]+
Crosspost�http://stackoverflow.com/q/17773976/1521179. I am trying to parse a file with Marpa with the difficulty that longest token matching of the SLIF seems to get in my way. My grammar contains:
record ::= ('!') key (':') value
key � � ~ �[\w]+value � ~ �[^\s]+
Now when I let it parse "! key : value", then everything works fine. But when the input is �"! key:value", the longest token after the "!"�is the "key:value"�of type "value", although it cannot�occur at this position. I would be interested in learning
- � why the SLIF considers terminals that cannot be accepted at this position.
- � how I must change my program so that both the input with and without spaces parse the same. If possible, without writing my own scanner (this would defeat the whole point of the SLIF).
It would probably be best if the answer to the second question gets posted to stackoverflow, where more people can benefit. I suspect the answer will utilize events, but I cannot figure out how to do this myself.
--
You received this message because you are subscribed to the Google Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
�
�