Am Monday 08 June 2009 13:36:53 schrieb Steven Obua:
>
> It is really just a parsing question, the whole lexing issue is
> besides the point. Note that you can have ANTLR grammars without a
> lexer, just as in a packrat grammar.

if I use:
parser grammar P;

options {
        output = AST;
        backtrack=true;
        memoize=true;
        k=1;
}

start: content EOF;
content: 'a'+ ;

I get an error, since the lexer is missing:
ANTLR Parser Generator  Version 3.1.1
error(107): P.g:11:10: literal has no associated lexer rule: 'a'
error(107): P.g:11:10: literal has no associated lexer rule: 'a'



if I use instead:
grammar P;   // missing parser keyword

// rest the same

it works but generates a lexer.

cheers,
 Michael


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to