LightJason / Java-AgentSpeak

LightJason - AgentSpeak(L++) for Java
https://agentspeak-java.lightjason.org
Other
23 stars 7 forks source link

grammer keyword #22

Closed flashpixx closed 6 years ago

flashpixx commented 7 years ago

fix grammar, so that terminal symbols can be part of a literal or variable see https://groups.google.com/forum/#!searchin/antlr-discussion/kraus|sort:relevance/antlr-discussion/H-Fn6-DmtBo/bbR1LFrqAQAJ

flashpixx commented 7 years ago

Use fragment keyword in the lexer grammer and move parser rule to lexer e.g.:

LOGICALVALUE  : TRUE | FALSE;
fragment TRUE   : 'true' | 'success';
fragment FALSE  : 'false' | 'fail';
flashpixx commented 7 years ago

replace logicvalues and numeric constants with lexer fragment a5406c77a938cd6d390bd78e75c455ab2b22db54 and 66970a7dd5e9718ca42262b6574f2edbf8b1e76a

flashpixx commented 7 years ago

replace string with fragments a5d72c0daea3ffc82ac86b4906f24a40cad246cc

flashpixx commented 7 years ago

replace with lexer fragment dc26f91df27e2b77da6c44ddf39cd09914d17c4f, 4f6c07f7504e1dda7d9a4be0c13a8e88e50c6bbb and a7d49ae8a743e5bfca65c9bac8f9aeeea98bb428