[antlr-interest] Multipass parsing

John D. Mitchell johnm-antlr at non.net
Tue Apr 6 07:27:59 PDT 2004


>>>>> "FranklinChen" == FranklinChen  <FranklinChen at cmu.edu> writes:
[...]

>> FWIW, that's a *really* bad idea in a language.

> It's also not under my control.  I am given a language, I need to parse
> it, so I'm interested in ideas on how to do it with ANTLR, if possible.
> I didn't design this language.

My condolences.


[...]
>> As I noted, you can write a very permissive lexer and a permissive
>> parser and then do whatever specific checks via multiple tree grammars.

> Context-sensitivity, including the whitespace issue, makes this
> difficult.  For example: grape[fruit] should be differently parsed from
> grape [C { int i; }] and differently parsed from grape [Perl { my $i = 3;
> }]

> I need multiple lexers, not just one permissive lexer.

Given your example, I still don't see why you might actually need it.

Thanks,
	John


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list