Fw: [antlr-interest] LITERAL_match not found

Alexey Demakov demakov at ispras.ru
Fri Jul 29 03:56:59 PDT 2005


And again: I've tried 2.7.5, 2.7.6b2 and even antlr-2.7.2 but always there was

MMLParser.java:
public class MMLParser extends antlr.LLkParser       implements MMLParserTokenTypes

and MMLParserTokenTypes.java always has LITERAL_match definition.

So, I suspect that something concerning Eclipse wrong, it is not ANTLR bug.
Do you have any other compilation errors? May be you didn't refresh workspace
and Eclipse can't find MMLParserTokenTypes or something?

And again - is MATCH_literal defined in generated MMLParserTokenTypes interface?

This error message is not from ANTLR, but mapped by ANTLR plugin from generated
java file to g file. Try to rebuild ANTLR files manually one more time.
ANTLR Eclipse plugin doesn't work well when there are grammar inheritance.

Regards,
Alexey

-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com



----- Original Message ----- 
From: "Dimitrios Kolovos" <dskolovos at gmail.com>
To: "Alexey Demakov" <demakov at ispras.ru>
Sent: Friday, July 29, 2005 2:19 PM
Subject: Re: [antlr-interest] LITERAL_match not found


> The header of my grammar:
> 
> class MMLParser extends OLParser;
> 
> options {
>     k = 2;
>     exportVocab = MMLParser;
>     buildAST = true;
> }
> 
> The header of OLParser
> 
> class OLParser extends Parser;
> 
> options {
>     k = 2;
>     exportVocab = OLParser;
>     buildAST = true;
> }
> 
> Thanks for your help.
> 
> Dimitrios
> 
> Alexey Demakov wrote:
> 
> >Is MATCH_literal defined in *TokenTypes interface implemented by parser?
> >Can you post header of your grammar(s) with options sections?
> >I can't reproduce this error.
> >
> >Regards,
> >Alexey
> >
> >-----
> >Alexey Demakov
> >TreeDL: Tree Description Language: http://treedl.sourceforge.net
> >RedVerst Group: http://www.unitesk.com
> >
> >----- Original Message ----- 
> >From: "Dimitrios Kolovos" <dskolovos at gmail.com>
> >To: "Alexey Demakov" <demakov at ispras.ru>
> >Cc: <antlr-interest at antlr.org>
> >Sent: Friday, July 29, 2005 1:51 PM
> >Subject: Re: [antlr-interest] LITERAL_match not found
> >
> >
> >  
> >
> >>Thanks. Can anyone answer though why this message is produced anyway?
> >>
> >>Cheers,
> >>Dimitrios
> >>
> >>Alexey Demakov wrote:
> >>
> >>    
> >>
> >>>Try to move "match" from parser to lexer tokens section
> >>>and use MATCH instead.
> >>>
> >>>Regards,
> >>>Alexey
> >>>
> >>>-----
> >>>Alexey Demakov
> >>>TreeDL: Tree Description Language: http://treedl.sourceforge.net
> >>>RedVerst Group: http://www.unitesk.com
> >>>
> >>>
> >>>
> >>>----- Original Message ----- 
> >>>From: "Dimitrios Kolovos" <dskolovos at gmail.com>
> >>>To: <antlr-interest at antlr.org>
> >>>Sent: Thursday, July 28, 2005 5:16 PM
> >>>Subject: [antlr-interest] LITERAL_match not found
> >>>
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>Hi,
> >>>>
> >>>>I have come against a problem which I cannot resolve so any help would 
> >>>>be appreciated.
> >>>>
> >>>>The following part of a rule
> >>>>
> >>>>"match"! NAME expression END! "match"!
> >>>>
> >>>>produces a "LITERAL_match cannot be resolved" error message. Any ideas?
> >>>>
> >>>>(I use the Eclipse-ANTLR and the version of ANTLR that comes with it)
> >>>>
> >>>>Cheers,
> >>>>Dimitrios
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>> 
> >>>
> >>>      
> >>>
> >
> >
> >  
> >



More information about the antlr-interest mailing list