Skip to content

Commit

Permalink
Add autodiscover for terminal-nonterminal
Browse files Browse the repository at this point in the history
  • Loading branch information
imcatta committed Jan 18, 2020
1 parent 1931790 commit 722ab87
Show file tree
Hide file tree
Showing 13 changed files with 1,243 additions and 1,038 deletions.
16 changes: 7 additions & 9 deletions grammarlang/grammarlang.g4
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
grammar grammarlang;

rulelist: start_symbol? rule_+ EOF;
start_symbol: START_SYMBOL_KEYWORD NONTERMINAL SEMICOLON;
start_symbol: START_SYMBOL_KEYWORD SYMBOL SEMICOLON;
rule_: l ASSIGN r SEMICOLON;
l: NONTERMINAL;
r: (NONTERMINAL | TERMINAL)*;
l: SYMBOL;
r: SYMBOL*;

START_SYMBOL_KEYWORD: '_start_symbol';
ASSIGN: '->';
START_SYMBOL_KEYWORD: '#start_symbol';
ASSIGN: '->' | '=>';
SEMICOLON: ';';
NONTERMINAL: ('A' ..'Z') ('A' ..'Z' | '0' ..'9')*;
TERMINAL: ('a' ..'z') ('a' ..'z' | '0' ..'9')*;

COMMENT: ( '//' ~[\r\n]* (('\r'? '\n') | EOF) | '/*' .*? '*/') -> skip;
SYMBOL: ('A' ..'Z' | 'a' .. 'z' | '0' ..'9' | '_')+;
COMMENT: ('//' ~[\r\n]* (('\r'? '\n') | EOF) | '/*' .*? '*/') -> skip;
WS: [ \r\n\t] -> skip;
10 changes: 4 additions & 6 deletions grammarlang/grammarlang.interp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
token literal names:
null
'_start_symbol'
'->'
';'
'#start_symbol'
null
';'
null
null
null
Expand All @@ -13,8 +12,7 @@ null
START_SYMBOL_KEYWORD
ASSIGN
SEMICOLON
NONTERMINAL
TERMINAL
SYMBOL
COMMENT
WS

Expand All @@ -27,4 +25,4 @@ r


atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 9, 40, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 3, 2, 5, 2, 14, 10, 2, 3, 2, 6, 2, 17, 10, 2, 13, 2, 14, 2, 18, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 7, 6, 35, 10, 6, 12, 6, 14, 6, 38, 11, 6, 3, 6, 2, 2, 7, 2, 4, 6, 8, 10, 2, 3, 3, 2, 6, 7, 2, 37, 2, 13, 3, 2, 2, 2, 4, 22, 3, 2, 2, 2, 6, 26, 3, 2, 2, 2, 8, 31, 3, 2, 2, 2, 10, 36, 3, 2, 2, 2, 12, 14, 5, 4, 3, 2, 13, 12, 3, 2, 2, 2, 13, 14, 3, 2, 2, 2, 14, 16, 3, 2, 2, 2, 15, 17, 5, 6, 4, 2, 16, 15, 3, 2, 2, 2, 17, 18, 3, 2, 2, 2, 18, 16, 3, 2, 2, 2, 18, 19, 3, 2, 2, 2, 19, 20, 3, 2, 2, 2, 20, 21, 7, 2, 2, 3, 21, 3, 3, 2, 2, 2, 22, 23, 7, 3, 2, 2, 23, 24, 7, 6, 2, 2, 24, 25, 7, 5, 2, 2, 25, 5, 3, 2, 2, 2, 26, 27, 5, 8, 5, 2, 27, 28, 7, 4, 2, 2, 28, 29, 5, 10, 6, 2, 29, 30, 7, 5, 2, 2, 30, 7, 3, 2, 2, 2, 31, 32, 7, 6, 2, 2, 32, 9, 3, 2, 2, 2, 33, 35, 9, 2, 2, 2, 34, 33, 3, 2, 2, 2, 35, 38, 3, 2, 2, 2, 36, 34, 3, 2, 2, 2, 36, 37, 3, 2, 2, 2, 37, 11, 3, 2, 2, 2, 38, 36, 3, 2, 2, 2, 5, 13, 18, 36]
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 8, 40, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 3, 2, 5, 2, 14, 10, 2, 3, 2, 6, 2, 17, 10, 2, 13, 2, 14, 2, 18, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 7, 6, 35, 10, 6, 12, 6, 14, 6, 38, 11, 6, 3, 6, 2, 2, 7, 2, 4, 6, 8, 10, 2, 2, 2, 37, 2, 13, 3, 2, 2, 2, 4, 22, 3, 2, 2, 2, 6, 26, 3, 2, 2, 2, 8, 31, 3, 2, 2, 2, 10, 36, 3, 2, 2, 2, 12, 14, 5, 4, 3, 2, 13, 12, 3, 2, 2, 2, 13, 14, 3, 2, 2, 2, 14, 16, 3, 2, 2, 2, 15, 17, 5, 6, 4, 2, 16, 15, 3, 2, 2, 2, 17, 18, 3, 2, 2, 2, 18, 16, 3, 2, 2, 2, 18, 19, 3, 2, 2, 2, 19, 20, 3, 2, 2, 2, 20, 21, 7, 2, 2, 3, 21, 3, 3, 2, 2, 2, 22, 23, 7, 3, 2, 2, 23, 24, 7, 6, 2, 2, 24, 25, 7, 5, 2, 2, 25, 5, 3, 2, 2, 2, 26, 27, 5, 8, 5, 2, 27, 28, 7, 4, 2, 2, 28, 29, 5, 10, 6, 2, 29, 30, 7, 5, 2, 2, 30, 7, 3, 2, 2, 2, 31, 32, 7, 6, 2, 2, 32, 9, 3, 2, 2, 2, 33, 35, 7, 6, 2, 2, 34, 33, 3, 2, 2, 2, 35, 38, 3, 2, 2, 2, 36, 34, 3, 2, 2, 2, 36, 37, 3, 2, 2, 2, 37, 11, 3, 2, 2, 2, 38, 36, 3, 2, 2, 2, 5, 13, 18, 36]
10 changes: 4 additions & 6 deletions grammarlang/grammarlang.tokens
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
START_SYMBOL_KEYWORD=1
ASSIGN=2
SEMICOLON=3
NONTERMINAL=4
TERMINAL=5
COMMENT=6
WS=7
'_start_symbol'=1
'->'=2
SYMBOL=4
COMMENT=5
WS=6
'#start_symbol'=1
';'=3
13 changes: 5 additions & 8 deletions grammarlang/grammarlangLexer.interp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
token literal names:
null
'_start_symbol'
'->'
';'
'#start_symbol'
null
';'
null
null
null
Expand All @@ -13,17 +12,15 @@ null
START_SYMBOL_KEYWORD
ASSIGN
SEMICOLON
NONTERMINAL
TERMINAL
SYMBOL
COMMENT
WS

rule names:
START_SYMBOL_KEYWORD
ASSIGN
SEMICOLON
NONTERMINAL
TERMINAL
SYMBOL
COMMENT
WS

Expand All @@ -35,4 +32,4 @@ mode names:
DEFAULT_MODE

atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 9, 85, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 7, 5, 39, 10, 5, 12, 5, 14, 5, 42, 11, 5, 3, 6, 3, 6, 7, 6, 46, 10, 6, 12, 6, 14, 6, 49, 11, 6, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 55, 10, 7, 12, 7, 14, 7, 58, 11, 7, 3, 7, 5, 7, 61, 10, 7, 3, 7, 3, 7, 5, 7, 65, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 71, 10, 7, 12, 7, 14, 7, 74, 11, 7, 3, 7, 3, 7, 5, 7, 78, 10, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 72, 2, 9, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 3, 2, 6, 4, 2, 50, 59, 67, 92, 4, 2, 50, 59, 99, 124, 4, 2, 12, 12, 15, 15, 5, 2, 11, 12, 15, 15, 34, 34, 2, 91, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 3, 17, 3, 2, 2, 2, 5, 31, 3, 2, 2, 2, 7, 34, 3, 2, 2, 2, 9, 36, 3, 2, 2, 2, 11, 43, 3, 2, 2, 2, 13, 77, 3, 2, 2, 2, 15, 81, 3, 2, 2, 2, 17, 18, 7, 97, 2, 2, 18, 19, 7, 117, 2, 2, 19, 20, 7, 118, 2, 2, 20, 21, 7, 99, 2, 2, 21, 22, 7, 116, 2, 2, 22, 23, 7, 118, 2, 2, 23, 24, 7, 97, 2, 2, 24, 25, 7, 117, 2, 2, 25, 26, 7, 123, 2, 2, 26, 27, 7, 111, 2, 2, 27, 28, 7, 100, 2, 2, 28, 29, 7, 113, 2, 2, 29, 30, 7, 110, 2, 2, 30, 4, 3, 2, 2, 2, 31, 32, 7, 47, 2, 2, 32, 33, 7, 64, 2, 2, 33, 6, 3, 2, 2, 2, 34, 35, 7, 61, 2, 2, 35, 8, 3, 2, 2, 2, 36, 40, 4, 67, 92, 2, 37, 39, 9, 2, 2, 2, 38, 37, 3, 2, 2, 2, 39, 42, 3, 2, 2, 2, 40, 38, 3, 2, 2, 2, 40, 41, 3, 2, 2, 2, 41, 10, 3, 2, 2, 2, 42, 40, 3, 2, 2, 2, 43, 47, 4, 99, 124, 2, 44, 46, 9, 3, 2, 2, 45, 44, 3, 2, 2, 2, 46, 49, 3, 2, 2, 2, 47, 45, 3, 2, 2, 2, 47, 48, 3, 2, 2, 2, 48, 12, 3, 2, 2, 2, 49, 47, 3, 2, 2, 2, 50, 51, 7, 49, 2, 2, 51, 52, 7, 49, 2, 2, 52, 56, 3, 2, 2, 2, 53, 55, 10, 4, 2, 2, 54, 53, 3, 2, 2, 2, 55, 58, 3, 2, 2, 2, 56, 54, 3, 2, 2, 2, 56, 57, 3, 2, 2, 2, 57, 64, 3, 2, 2, 2, 58, 56, 3, 2, 2, 2, 59, 61, 7, 15, 2, 2, 60, 59, 3, 2, 2, 2, 60, 61, 3, 2, 2, 2, 61, 62, 3, 2, 2, 2, 62, 65, 7, 12, 2, 2, 63, 65, 7, 2, 2, 3, 64, 60, 3, 2, 2, 2, 64, 63, 3, 2, 2, 2, 65, 78, 3, 2, 2, 2, 66, 67, 7, 49, 2, 2, 67, 68, 7, 44, 2, 2, 68, 72, 3, 2, 2, 2, 69, 71, 11, 2, 2, 2, 70, 69, 3, 2, 2, 2, 71, 74, 3, 2, 2, 2, 72, 73, 3, 2, 2, 2, 72, 70, 3, 2, 2, 2, 73, 75, 3, 2, 2, 2, 74, 72, 3, 2, 2, 2, 75, 76, 7, 44, 2, 2, 76, 78, 7, 49, 2, 2, 77, 50, 3, 2, 2, 2, 77, 66, 3, 2, 2, 2, 78, 79, 3, 2, 2, 2, 79, 80, 8, 7, 2, 2, 80, 14, 3, 2, 2, 2, 81, 82, 9, 5, 2, 2, 82, 83, 3, 2, 2, 2, 83, 84, 8, 8, 2, 2, 84, 16, 3, 2, 2, 2, 10, 2, 40, 47, 56, 60, 64, 72, 77, 3, 8, 2, 2]
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 8, 77, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 34, 10, 3, 3, 4, 3, 4, 3, 5, 6, 5, 39, 10, 5, 13, 5, 14, 5, 40, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 47, 10, 6, 12, 6, 14, 6, 50, 11, 6, 3, 6, 5, 6, 53, 10, 6, 3, 6, 3, 6, 5, 6, 57, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 63, 10, 6, 12, 6, 14, 6, 66, 11, 6, 3, 6, 3, 6, 5, 6, 70, 10, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 64, 2, 8, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 3, 2, 5, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 4, 2, 12, 12, 15, 15, 5, 2, 11, 12, 15, 15, 34, 34, 2, 83, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 3, 15, 3, 2, 2, 2, 5, 33, 3, 2, 2, 2, 7, 35, 3, 2, 2, 2, 9, 38, 3, 2, 2, 2, 11, 69, 3, 2, 2, 2, 13, 73, 3, 2, 2, 2, 15, 16, 7, 37, 2, 2, 16, 17, 7, 117, 2, 2, 17, 18, 7, 118, 2, 2, 18, 19, 7, 99, 2, 2, 19, 20, 7, 116, 2, 2, 20, 21, 7, 118, 2, 2, 21, 22, 7, 97, 2, 2, 22, 23, 7, 117, 2, 2, 23, 24, 7, 123, 2, 2, 24, 25, 7, 111, 2, 2, 25, 26, 7, 100, 2, 2, 26, 27, 7, 113, 2, 2, 27, 28, 7, 110, 2, 2, 28, 4, 3, 2, 2, 2, 29, 30, 7, 47, 2, 2, 30, 34, 7, 64, 2, 2, 31, 32, 7, 63, 2, 2, 32, 34, 7, 64, 2, 2, 33, 29, 3, 2, 2, 2, 33, 31, 3, 2, 2, 2, 34, 6, 3, 2, 2, 2, 35, 36, 7, 61, 2, 2, 36, 8, 3, 2, 2, 2, 37, 39, 9, 2, 2, 2, 38, 37, 3, 2, 2, 2, 39, 40, 3, 2, 2, 2, 40, 38, 3, 2, 2, 2, 40, 41, 3, 2, 2, 2, 41, 10, 3, 2, 2, 2, 42, 43, 7, 49, 2, 2, 43, 44, 7, 49, 2, 2, 44, 48, 3, 2, 2, 2, 45, 47, 10, 3, 2, 2, 46, 45, 3, 2, 2, 2, 47, 50, 3, 2, 2, 2, 48, 46, 3, 2, 2, 2, 48, 49, 3, 2, 2, 2, 49, 56, 3, 2, 2, 2, 50, 48, 3, 2, 2, 2, 51, 53, 7, 15, 2, 2, 52, 51, 3, 2, 2, 2, 52, 53, 3, 2, 2, 2, 53, 54, 3, 2, 2, 2, 54, 57, 7, 12, 2, 2, 55, 57, 7, 2, 2, 3, 56, 52, 3, 2, 2, 2, 56, 55, 3, 2, 2, 2, 57, 70, 3, 2, 2, 2, 58, 59, 7, 49, 2, 2, 59, 60, 7, 44, 2, 2, 60, 64, 3, 2, 2, 2, 61, 63, 11, 2, 2, 2, 62, 61, 3, 2, 2, 2, 63, 66, 3, 2, 2, 2, 64, 65, 3, 2, 2, 2, 64, 62, 3, 2, 2, 2, 65, 67, 3, 2, 2, 2, 66, 64, 3, 2, 2, 2, 67, 68, 7, 44, 2, 2, 68, 70, 7, 49, 2, 2, 69, 42, 3, 2, 2, 2, 69, 58, 3, 2, 2, 2, 70, 71, 3, 2, 2, 2, 71, 72, 8, 6, 2, 2, 72, 12, 3, 2, 2, 2, 73, 74, 9, 4, 2, 2, 74, 75, 3, 2, 2, 2, 75, 76, 8, 7, 2, 2, 76, 14, 3, 2, 2, 2, 10, 2, 33, 40, 48, 52, 56, 64, 69, 3, 8, 2, 2]
113 changes: 54 additions & 59 deletions grammarlang/grammarlangLexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,54 @@ var antlr4 = require('antlr4/index');


var serializedATN = ["\u0003\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964",
"\u0002\tU\b\u0001\u0004\u0002\t\u0002\u0004\u0003\t\u0003\u0004\u0004",
"\u0002\bM\b\u0001\u0004\u0002\t\u0002\u0004\u0003\t\u0003\u0004\u0004",
"\t\u0004\u0004\u0005\t\u0005\u0004\u0006\t\u0006\u0004\u0007\t\u0007",
"\u0004\b\t\b\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002",
"\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002",
"\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0003\u0003\u0003\u0003\u0003",
"\u0003\u0004\u0003\u0004\u0003\u0005\u0003\u0005\u0007\u0005\'\n\u0005",
"\f\u0005\u000e\u0005*\u000b\u0005\u0003\u0006\u0003\u0006\u0007\u0006",
".\n\u0006\f\u0006\u000e\u00061\u000b\u0006\u0003\u0007\u0003\u0007\u0003",
"\u0007\u0003\u0007\u0007\u00077\n\u0007\f\u0007\u000e\u0007:\u000b\u0007",
"\u0003\u0007\u0005\u0007=\n\u0007\u0003\u0007\u0003\u0007\u0005\u0007",
"A\n\u0007\u0003\u0007\u0003\u0007\u0003\u0007\u0003\u0007\u0007\u0007",
"G\n\u0007\f\u0007\u000e\u0007J\u000b\u0007\u0003\u0007\u0003\u0007\u0005",
"\u0007N\n\u0007\u0003\u0007\u0003\u0007\u0003\b\u0003\b\u0003\b\u0003",
"\b\u0003H\u0002\t\u0003\u0003\u0005\u0004\u0007\u0005\t\u0006\u000b",
"\u0007\r\b\u000f\t\u0003\u0002\u0006\u0004\u00022;C\\\u0004\u00022;",
"c|\u0004\u0002\f\f\u000f\u000f\u0005\u0002\u000b\f\u000f\u000f\"\"\u0002",
"[\u0002\u0003\u0003\u0002\u0002\u0002\u0002\u0005\u0003\u0002\u0002",
"\u0002\u0002\u0007\u0003\u0002\u0002\u0002\u0002\t\u0003\u0002\u0002",
"\u0002\u0002\u000b\u0003\u0002\u0002\u0002\u0002\r\u0003\u0002\u0002",
"\u0002\u0002\u000f\u0003\u0002\u0002\u0002\u0003\u0011\u0003\u0002\u0002",
"\u0002\u0005\u001f\u0003\u0002\u0002\u0002\u0007\"\u0003\u0002\u0002",
"\u0002\t$\u0003\u0002\u0002\u0002\u000b+\u0003\u0002\u0002\u0002\rM",
"\u0003\u0002\u0002\u0002\u000fQ\u0003\u0002\u0002\u0002\u0011\u0012",
"\u0007a\u0002\u0002\u0012\u0013\u0007u\u0002\u0002\u0013\u0014\u0007",
"v\u0002\u0002\u0014\u0015\u0007c\u0002\u0002\u0015\u0016\u0007t\u0002",
"\u0002\u0016\u0017\u0007v\u0002\u0002\u0017\u0018\u0007a\u0002\u0002",
"\u0018\u0019\u0007u\u0002\u0002\u0019\u001a\u0007{\u0002\u0002\u001a",
"\u001b\u0007o\u0002\u0002\u001b\u001c\u0007d\u0002\u0002\u001c\u001d",
"\u0007q\u0002\u0002\u001d\u001e\u0007n\u0002\u0002\u001e\u0004\u0003",
"\u0002\u0002\u0002\u001f \u0007/\u0002\u0002 !\u0007@\u0002\u0002!\u0006",
"\u0003\u0002\u0002\u0002\"#\u0007=\u0002\u0002#\b\u0003\u0002\u0002",
"\u0002$(\u0004C\\\u0002%\'\t\u0002\u0002\u0002&%\u0003\u0002\u0002\u0002",
"\'*\u0003\u0002\u0002\u0002(&\u0003\u0002\u0002\u0002()\u0003\u0002",
"\u0002\u0002)\n\u0003\u0002\u0002\u0002*(\u0003\u0002\u0002\u0002+/",
"\u0004c|\u0002,.\t\u0003\u0002\u0002-,\u0003\u0002\u0002\u0002.1\u0003",
"\u0002\u0002\u0002/-\u0003\u0002\u0002\u0002/0\u0003\u0002\u0002\u0002",
"0\f\u0003\u0002\u0002\u00021/\u0003\u0002\u0002\u000223\u00071\u0002",
"\u000234\u00071\u0002\u000248\u0003\u0002\u0002\u000257\n\u0004\u0002",
"\u000265\u0003\u0002\u0002\u00027:\u0003\u0002\u0002\u000286\u0003\u0002",
"\u0002\u000289\u0003\u0002\u0002\u00029@\u0003\u0002\u0002\u0002:8\u0003",
"\u0002\u0002\u0002;=\u0007\u000f\u0002\u0002<;\u0003\u0002\u0002\u0002",
"<=\u0003\u0002\u0002\u0002=>\u0003\u0002\u0002\u0002>A\u0007\f\u0002",
"\u0002?A\u0007\u0002\u0002\u0003@<\u0003\u0002\u0002\u0002@?\u0003\u0002",
"\u0002\u0002AN\u0003\u0002\u0002\u0002BC\u00071\u0002\u0002CD\u0007",
",\u0002\u0002DH\u0003\u0002\u0002\u0002EG\u000b\u0002\u0002\u0002FE",
"\u0003\u0002\u0002\u0002GJ\u0003\u0002\u0002\u0002HI\u0003\u0002\u0002",
"\u0002HF\u0003\u0002\u0002\u0002IK\u0003\u0002\u0002\u0002JH\u0003\u0002",
"\u0002\u0002KL\u0007,\u0002\u0002LN\u00071\u0002\u0002M2\u0003\u0002",
"\u0002\u0002MB\u0003\u0002\u0002\u0002NO\u0003\u0002\u0002\u0002OP\b",
"\u0007\u0002\u0002P\u000e\u0003\u0002\u0002\u0002QR\t\u0005\u0002\u0002",
"RS\u0003\u0002\u0002\u0002ST\b\b\u0002\u0002T\u0010\u0003\u0002\u0002",
"\u0002\n\u0002(/8<@HM\u0003\b\u0002\u0002"].join("");
"\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002",
"\u0003\u0002\u0003\u0002\u0003\u0003\u0003\u0003\u0003\u0003\u0003\u0003",
"\u0005\u0003\"\n\u0003\u0003\u0004\u0003\u0004\u0003\u0005\u0006\u0005",
"\'\n\u0005\r\u0005\u000e\u0005(\u0003\u0006\u0003\u0006\u0003\u0006",
"\u0003\u0006\u0007\u0006/\n\u0006\f\u0006\u000e\u00062\u000b\u0006\u0003",
"\u0006\u0005\u00065\n\u0006\u0003\u0006\u0003\u0006\u0005\u00069\n\u0006",
"\u0003\u0006\u0003\u0006\u0003\u0006\u0003\u0006\u0007\u0006?\n\u0006",
"\f\u0006\u000e\u0006B\u000b\u0006\u0003\u0006\u0003\u0006\u0005\u0006",
"F\n\u0006\u0003\u0006\u0003\u0006\u0003\u0007\u0003\u0007\u0003\u0007",
"\u0003\u0007\u0003@\u0002\b\u0003\u0003\u0005\u0004\u0007\u0005\t\u0006",
"\u000b\u0007\r\b\u0003\u0002\u0005\u0006\u00022;C\\aac|\u0004\u0002",
"\f\f\u000f\u000f\u0005\u0002\u000b\f\u000f\u000f\"\"\u0002S\u0002\u0003",
"\u0003\u0002\u0002\u0002\u0002\u0005\u0003\u0002\u0002\u0002\u0002\u0007",
"\u0003\u0002\u0002\u0002\u0002\t\u0003\u0002\u0002\u0002\u0002\u000b",
"\u0003\u0002\u0002\u0002\u0002\r\u0003\u0002\u0002\u0002\u0003\u000f",
"\u0003\u0002\u0002\u0002\u0005!\u0003\u0002\u0002\u0002\u0007#\u0003",
"\u0002\u0002\u0002\t&\u0003\u0002\u0002\u0002\u000bE\u0003\u0002\u0002",
"\u0002\rI\u0003\u0002\u0002\u0002\u000f\u0010\u0007%\u0002\u0002\u0010",
"\u0011\u0007u\u0002\u0002\u0011\u0012\u0007v\u0002\u0002\u0012\u0013",
"\u0007c\u0002\u0002\u0013\u0014\u0007t\u0002\u0002\u0014\u0015\u0007",
"v\u0002\u0002\u0015\u0016\u0007a\u0002\u0002\u0016\u0017\u0007u\u0002",
"\u0002\u0017\u0018\u0007{\u0002\u0002\u0018\u0019\u0007o\u0002\u0002",
"\u0019\u001a\u0007d\u0002\u0002\u001a\u001b\u0007q\u0002\u0002\u001b",
"\u001c\u0007n\u0002\u0002\u001c\u0004\u0003\u0002\u0002\u0002\u001d",
"\u001e\u0007/\u0002\u0002\u001e\"\u0007@\u0002\u0002\u001f \u0007?\u0002",
"\u0002 \"\u0007@\u0002\u0002!\u001d\u0003\u0002\u0002\u0002!\u001f\u0003",
"\u0002\u0002\u0002\"\u0006\u0003\u0002\u0002\u0002#$\u0007=\u0002\u0002",
"$\b\u0003\u0002\u0002\u0002%\'\t\u0002\u0002\u0002&%\u0003\u0002\u0002",
"\u0002\'(\u0003\u0002\u0002\u0002(&\u0003\u0002\u0002\u0002()\u0003",
"\u0002\u0002\u0002)\n\u0003\u0002\u0002\u0002*+\u00071\u0002\u0002+",
",\u00071\u0002\u0002,0\u0003\u0002\u0002\u0002-/\n\u0003\u0002\u0002",
".-\u0003\u0002\u0002\u0002/2\u0003\u0002\u0002\u00020.\u0003\u0002\u0002",
"\u000201\u0003\u0002\u0002\u000218\u0003\u0002\u0002\u000220\u0003\u0002",
"\u0002\u000235\u0007\u000f\u0002\u000243\u0003\u0002\u0002\u000245\u0003",
"\u0002\u0002\u000256\u0003\u0002\u0002\u000269\u0007\f\u0002\u00027",
"9\u0007\u0002\u0002\u000384\u0003\u0002\u0002\u000287\u0003\u0002\u0002",
"\u00029F\u0003\u0002\u0002\u0002:;\u00071\u0002\u0002;<\u0007,\u0002",
"\u0002<@\u0003\u0002\u0002\u0002=?\u000b\u0002\u0002\u0002>=\u0003\u0002",
"\u0002\u0002?B\u0003\u0002\u0002\u0002@A\u0003\u0002\u0002\u0002@>\u0003",
"\u0002\u0002\u0002AC\u0003\u0002\u0002\u0002B@\u0003\u0002\u0002\u0002",
"CD\u0007,\u0002\u0002DF\u00071\u0002\u0002E*\u0003\u0002\u0002\u0002",
"E:\u0003\u0002\u0002\u0002FG\u0003\u0002\u0002\u0002GH\b\u0006\u0002",
"\u0002H\f\u0003\u0002\u0002\u0002IJ\t\u0004\u0002\u0002JK\u0003\u0002",
"\u0002\u0002KL\b\u0007\u0002\u0002L\u000e\u0003\u0002\u0002\u0002\n",
"\u0002!(048@E\u0003\b\u0002\u0002"].join("");


var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
Expand All @@ -82,25 +78,24 @@ grammarlangLexer.EOF = antlr4.Token.EOF;
grammarlangLexer.START_SYMBOL_KEYWORD = 1;
grammarlangLexer.ASSIGN = 2;
grammarlangLexer.SEMICOLON = 3;
grammarlangLexer.NONTERMINAL = 4;
grammarlangLexer.TERMINAL = 5;
grammarlangLexer.COMMENT = 6;
grammarlangLexer.WS = 7;
grammarlangLexer.SYMBOL = 4;
grammarlangLexer.COMMENT = 5;
grammarlangLexer.WS = 6;

grammarlangLexer.prototype.channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ];

grammarlangLexer.prototype.modeNames = [ "DEFAULT_MODE" ];

grammarlangLexer.prototype.literalNames = [ null, "'_start_symbol'", "'->'",
grammarlangLexer.prototype.literalNames = [ null, "'#start_symbol'", null,
"';'" ];

grammarlangLexer.prototype.symbolicNames = [ null, "START_SYMBOL_KEYWORD",
"ASSIGN", "SEMICOLON", "NONTERMINAL",
"TERMINAL", "COMMENT", "WS" ];
"ASSIGN", "SEMICOLON", "SYMBOL",
"COMMENT", "WS" ];

grammarlangLexer.prototype.ruleNames = [ "START_SYMBOL_KEYWORD", "ASSIGN",
"SEMICOLON", "NONTERMINAL", "TERMINAL",
"COMMENT", "WS" ];
"SEMICOLON", "SYMBOL", "COMMENT",
"WS" ];

grammarlangLexer.prototype.grammarFileName = "grammarlang.g4";

Expand Down
10 changes: 4 additions & 6 deletions grammarlang/grammarlangLexer.tokens
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
START_SYMBOL_KEYWORD=1
ASSIGN=2
SEMICOLON=3
NONTERMINAL=4
TERMINAL=5
COMMENT=6
WS=7
'_start_symbol'=1
'->'=2
SYMBOL=4
COMMENT=5
WS=6
'#start_symbol'=1
';'=3
Loading

0 comments on commit 722ab87

Please sign in to comment.