Many thanks for your time and effort here.  I appreciate it greatly.  I'll 
look over your changes and see what I can learn. 

On Friday, May 9, 2014 7:35:11 PM UTC-7, Jeffrey Kegler wrote:
>
>  You may prefer to go with procedural parsing, but I worked up a grammar 
> driven solution which I've just pasted here: 
> http://scsys.co.uk:8002/370004
>
> It tests OK AFAIK.  The strategy was to, first, use the lexer to slurp up 
> "simple coments" -- those with no interior equal signs or hash signs.  
> Second, to make tag names and base declarations also lexemes.  LATM 
> guarantees tag names and base declarations will only be accepted in the 
> correct context.  Finally, there is a fall back 'ComplexComment' which is 
> lexed character-by-character.
>
> Note this plays along with the lexer's greediness.  What long stuff can be 
> safely slurped up in the lexer, I slurp up first.  Then I go for the 
> specifics.  Finally, I have a fallback which, if nothing else works, will 
> eat up the comment character-by-character.  It uses lexemes one character 
> long, guaranteeing that it will only be used as the last resort.
>
> The character-by-character fallback will be slow if used a lot, but it 
> should rarely be used.  This does not exhaust the possible tricks, by any 
> means, but I think it parses everything correctly and in what I expect will 
> be reasonable time.
>
> -- jeffrey
>
>
>  

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to