Hello EveryOne, I have a problem while using generated parserlexer from 
following grammar.while using parser it is giving exception while freeing 
parser.please refer attached file herewith.ThanksAjit


Ajit V. Shinde
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Hello EveryOne,
 I have a problem while using generated parserlexer from following grammar.
while using parser it is giving exception while freeing parser.
parser->free(parser);

following is the prototype grammer file. Is something wrong with grammar rule?

(i am importing all lexer rules from ExprLexerRules  file)
 I am able to generate LexerParser for following grammar.

Identifier  used here is like ABD or BCG etc. 
ex-pression like ABC += BCD

grammar ex-pression;

options
{
    backtrack     = true;
    memoize     = true;
    k         = 2;
    language     = C;
    output       = AST;
    ASTLabelType = pANTLR3_BASE_TREE;    
}

//importing already defined lexer and parser rules
import   ExprLexerRules ;


operations
    :   binaryoperation?
    ;   

binaryoperation
    :   binaryex-pression EOF
    ;
    

binaryex-pression
    :  LPAREN! Identifier (DIVIDEEQUAL | PLUSEQUAL | MINUSEQUAL | TIMESEQUAL)^ 
Identifier  RPAREN!
    ;      



DIVIDEEQUAL    :       '/=';
PLUSEQUAL    :    '+=';
MINUSEQUAL    :    '-=';
TIMESEQUAL    :    '*=';
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to