You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start. S ::= Name ;
token Name (char - [ "(){};.@\" \n\t" ]) + ;
This yields a ANTLR lexer file containing:
// This Antlr4 file was machine-generated by the BNF converter
lexer grammar testLexer;
// Predefined regular expressions in BNFC
fragment LETTER : CAPITAL | SMALL ;
fragment CAPITAL : [A-Z\u00C0-\u00D6\u00D8-\u00DE] ;
fragment SMALL : [a-z\u00DF-\u00F6\u00F8-\u00FF] ;
fragment DIGIT : [0-9] ;
Name : ~[
"().;@{}]+;
// Whitespace
WS : (' ' | '\r' | '\t' | '\n' | '\f')+ -> skip;
// Escapable sequences
fragment
Escapable : ('"' | '\\' | 'n' | 't' | 'r' | 'f');
ErrorToken : . ;
This raises the following errors:
java org.antlr.v4.Tool -lib test -package test test/testLexer.g4
error(50): testLexer.g4:10:8: syntax error: '[' came as a complete surprise to me
error(50): testLexer.g4:11:1: syntax error: '"' came as a complete surprise to me
error(50): testLexer.g4:11:3: syntax error: ')' came as a complete surprise to me while looking for lexer rule element
error(50): testLexer.g4:11:6: syntax error: '@' came as a complete surprise to me
error(50): testLexer.g4:11:9: syntax error: ']' came as a complete surprise to me
The text was updated successfully, but these errors were encountered:
This yields a ANTLR lexer file containing:
This raises the following errors:
The text was updated successfully, but these errors were encountered: