[antlr-interest] syntax error unexpected ast node

elekis elekis at gmail.com
Wed Apr 16 12:47:38 PDT 2008


hi all,

I have the following error in the Lexer

syntax error unexpected ast

I try to parse, thing like that
% everything exept return
% sdjfldsjfdkf
%sfkldfjkslkfjlf
%fskldfjjslkfdj

My first Idea were

T_Return				:('\r'|'\n')+{token = Token.SKIP_TOKEN;};
T_InlineMod				:'%'.* T_Return;

but he doesnt like that cause the . take \n too.
so I ve tried

T_Return				:('\r'|'\n')+{token = Token.SKIP_TOKEN;};
T_InlineMod				:'%'(~T_Return)* T_Return;
but I have the followed error

syntax error unexpected ast +  of cause it's for the  +{...}
but I have no idea how to correct that.

thanks

a+++


I

-- 
http://deathboater.blogspot.com/


More information about the antlr-interest mailing list