com.relogiclabs.json.schema.internal.grammar.JsonLexer.g4 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of relogiclabs-json-schema Show documentation
Show all versions of relogiclabs-json-schema Show documentation
The New JSON Schema prioritizes simplicity, conciseness, and readability, making
it user-friendly and accessible without the need for extensive prior knowledge.
It offers efficient read-write facilities, precise JSON document definition
through various data types and functions, and extensibility to meet modern web
service diverse requirements.
lexer grammar JsonLexer;
TRUE : 'true';
FALSE : 'false';
NULL : 'null';
LBRACKET : '[';
RBRACKET : ']';
LBRACE : '{';
RBRACE : '}';
COMMA : ',';
COLON : ':';
STRING : '"' (ESCAPE | SAFECODEPOINT)* '"';
fragment ESCAPE : '\\' ( ["\\/bfnrt] | UNICODE);
fragment UNICODE : 'u' HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT;
fragment HEXDIGIT : [0-9a-fA-F];
fragment SAFECODEPOINT : ~["\\\u0000-\u001F];
INTEGER : '-' ? INTDIGIT;
FLOAT : INTEGER ('.' DIGIT+);
DOUBLE : INTEGER ('.' DIGIT+)? EXPONENT;
fragment INTDIGIT : '0' | [1-9] DIGIT*;
fragment EXPONENT : [eE] [+\-]? DIGIT+;
fragment DIGIT : [0-9];
WHITE_SPACE : [\n\r\t ]+ -> skip;