Skip to content

Commit

Permalink
Add language support, and output with several paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Hekkvang committed Aug 14, 2018
1 parent 2926782 commit d50c979
Show file tree
Hide file tree
Showing 22 changed files with 1,242 additions and 649 deletions.
2 changes: 2 additions & 0 deletions antlr/SwaggableLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ CloseBrace: '}';
Dot: '.';
Comma: ',';
Underscore: '_';
Tick: '`';

// keywords
BaseInit: 'base';
ComponentInit: 'comp';
EnumInit: 'enum';
//SecSchemeInit: 'sec';
Expand Down
15 changes: 10 additions & 5 deletions antlr/SwaggableParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ program
: modelElements? EOF
;

baseDeclaration
: BaseInit Identifier objTail
;

objDeclaration
: ComponentInit Identifier objTail
;
Expand All @@ -21,11 +25,11 @@ enumBlock
;

identifierList
: Identifier (',' Identifier)*
: Identifier (Comma Identifier)*
;

extendsStatement
: ('<' identifierList)
: (LessThan identifierList)
;

objTail
Expand All @@ -41,11 +45,11 @@ nativeType
;

arrayType
: ArrayType '<' typeName '>'
: ArrayType LessThan typeName MoreThan
;

mapType
: MapType '<' typeName ',' typeName '>'
: MapType LessThan typeName Comma typeName MoreThan
;

typeName
Expand Down Expand Up @@ -84,7 +88,7 @@ annotationType
;

parameterDefinition
: typeName Identifier ('(' annotationType+ ')')?
: typeName Identifier (Tick annotationType+ Tick)?
;

objElement
Expand All @@ -94,6 +98,7 @@ objElement
modelElement
: objDeclaration
| enumDeclaration
| baseDeclaration
;

modelElements
Expand Down
8 changes: 7 additions & 1 deletion antlr/parser/SwaggableLexer.interp

Large diffs are not rendered by default.

84 changes: 44 additions & 40 deletions antlr/parser/SwaggableLexer.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,34 @@ CloseBrace=6
Dot=7
Comma=8
Underscore=9
ComponentInit=10
EnumInit=11
StringType=12
NumberType=13
ArrayType=14
BooleanType=15
MapType=16
Required=17
Searchable=18
Indexed=19
Format=20
PasswordFormat=21
DateFormat=22
DateTimeFormat=23
ByteFormat=24
BinaryFormat=25
EmailFormat=26
UuidFormat=27
UriFormat=28
HostnameFormat=29
Ipv4Format=30
Ipv6Format=31
Identifier=32
WS=33
COMMENT=34
LINE_COMMENT=35
Tick=10
BaseInit=11
ComponentInit=12
EnumInit=13
StringType=14
NumberType=15
ArrayType=16
BooleanType=17
MapType=18
Required=19
Searchable=20
Indexed=21
Format=22
PasswordFormat=23
DateFormat=24
DateTimeFormat=25
ByteFormat=26
BinaryFormat=27
EmailFormat=28
UuidFormat=29
UriFormat=30
HostnameFormat=31
Ipv4Format=32
Ipv6Format=33
Identifier=34
WS=35
COMMENT=36
LINE_COMMENT=37
'<'=1
'>'=2
'('=3
Expand All @@ -42,17 +44,19 @@ LINE_COMMENT=35
'.'=7
','=8
'_'=9
'comp'=10
'enum'=11
'map'=16
'format.password'=21
'format.date'=22
'format.datetime'=23
'format.byte'=24
'format.binary'=25
'format.email'=26
'format.uuid'=27
'format.uri'=28
'format.hostname'=29
'format.ipv4'=30
'format.ipv6'=31
'`'=10
'base'=11
'comp'=12
'enum'=13
'map'=18
'format.password'=23
'format.date'=24
'format.datetime'=25
'format.byte'=26
'format.binary'=27
'format.email'=28
'format.uuid'=29
'format.uri'=30
'format.hostname'=31
'format.ipv4'=32
'format.ipv6'=33
7 changes: 6 additions & 1 deletion antlr/parser/SwaggableParser.interp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ null
'.'
','
'_'
'`'
'base'
'comp'
'enum'
null
Expand Down Expand Up @@ -47,6 +49,8 @@ CloseBrace
Dot
Comma
Underscore
Tick
BaseInit
ComponentInit
EnumInit
StringType
Expand Down Expand Up @@ -76,6 +80,7 @@ LINE_COMMENT

rule names:
program
baseDeclaration
objDeclaration
enumDeclaration
enumBlock
Expand All @@ -97,4 +102,4 @@ modelElements


atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 37, 161, 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, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 3, 2, 5, 2, 42, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 7, 5, 59, 10, 5, 12, 5, 14, 5, 62, 11, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 7, 6, 69, 10, 6, 12, 6, 14, 6, 72, 11, 6, 3, 7, 3, 7, 3, 7, 3, 8, 5, 8, 78, 10, 8, 3, 8, 3, 8, 7, 8, 82, 10, 8, 12, 8, 14, 8, 85, 11, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 94, 10, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 5, 12, 110, 10, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 128, 10, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 136, 10, 16, 3, 17, 3, 17, 3, 17, 3, 17, 6, 17, 142, 10, 17, 13, 17, 14, 17, 143, 3, 17, 3, 17, 5, 17, 148, 10, 17, 3, 18, 3, 18, 3, 19, 3, 19, 5, 19, 154, 10, 19, 3, 20, 6, 20, 157, 10, 20, 13, 20, 14, 20, 158, 3, 20, 2, 2, 21, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 2, 2, 2, 169, 2, 41, 3, 2, 2, 2, 4, 45, 3, 2, 2, 2, 6, 49, 3, 2, 2, 2, 8, 56, 3, 2, 2, 2, 10, 65, 3, 2, 2, 2, 12, 73, 3, 2, 2, 2, 14, 77, 3, 2, 2, 2, 16, 93, 3, 2, 2, 2, 18, 95, 3, 2, 2, 2, 20, 100, 3, 2, 2, 2, 22, 109, 3, 2, 2, 2, 24, 111, 3, 2, 2, 2, 26, 127, 3, 2, 2, 2, 28, 129, 3, 2, 2, 2, 30, 135, 3, 2, 2, 2, 32, 137, 3, 2, 2, 2, 34, 149, 3, 2, 2, 2, 36, 153, 3, 2, 2, 2, 38, 156, 3, 2, 2, 2, 40, 42, 5, 38, 20, 2, 41, 40, 3, 2, 2, 2, 41, 42, 3, 2, 2, 2, 42, 43, 3, 2, 2, 2, 43, 44, 7, 2, 2, 3, 44, 3, 3, 2, 2, 2, 45, 46, 7, 12, 2, 2, 46, 47, 7, 34, 2, 2, 47, 48, 5, 14, 8, 2, 48, 5, 3, 2, 2, 2, 49, 50, 7, 13, 2, 2, 50, 51, 7, 34, 2, 2, 51, 52, 7, 3, 2, 2, 52, 53, 5, 22, 12, 2, 53, 54, 7, 4, 2, 2, 54, 55, 5, 8, 5, 2, 55, 7, 3, 2, 2, 2, 56, 60, 7, 7, 2, 2, 57, 59, 7, 34, 2, 2, 58, 57, 3, 2, 2, 2, 59, 62, 3, 2, 2, 2, 60, 58, 3, 2, 2, 2, 60, 61, 3, 2, 2, 2, 61, 63, 3, 2, 2, 2, 62, 60, 3, 2, 2, 2, 63, 64, 7, 8, 2, 2, 64, 9, 3, 2, 2, 2, 65, 70, 7, 34, 2, 2, 66, 67, 7, 10, 2, 2, 67, 69, 7, 34, 2, 2, 68, 66, 3, 2, 2, 2, 69, 72, 3, 2, 2, 2, 70, 68, 3, 2, 2, 2, 70, 71, 3, 2, 2, 2, 71, 11, 3, 2, 2, 2, 72, 70, 3, 2, 2, 2, 73, 74, 7, 3, 2, 2, 74, 75, 5, 10, 6, 2, 75, 13, 3, 2, 2, 2, 76, 78, 5, 12, 7, 2, 77, 76, 3, 2, 2, 2, 77, 78, 3, 2, 2, 2, 78, 79, 3, 2, 2, 2, 79, 83, 7, 7, 2, 2, 80, 82, 5, 34, 18, 2, 81, 80, 3, 2, 2, 2, 82, 85, 3, 2, 2, 2, 83, 81, 3, 2, 2, 2, 83, 84, 3, 2, 2, 2, 84, 86, 3, 2, 2, 2, 85, 83, 3, 2, 2, 2, 86, 87, 7, 8, 2, 2, 87, 15, 3, 2, 2, 2, 88, 94, 7, 14, 2, 2, 89, 94, 7, 15, 2, 2, 90, 94, 7, 17, 2, 2, 91, 94, 5, 18, 10, 2, 92, 94, 5, 20, 11, 2, 93, 88, 3, 2, 2, 2, 93, 89, 3, 2, 2, 2, 93, 90, 3, 2, 2, 2, 93, 91, 3, 2, 2, 2, 93, 92, 3, 2, 2, 2, 94, 17, 3, 2, 2, 2, 95, 96, 7, 16, 2, 2, 96, 97, 7, 3, 2, 2, 97, 98, 5, 22, 12, 2, 98, 99, 7, 4, 2, 2, 99, 19, 3, 2, 2, 2, 100, 101, 7, 18, 2, 2, 101, 102, 7, 3, 2, 2, 102, 103, 5, 22, 12, 2, 103, 104, 7, 10, 2, 2, 104, 105, 5, 22, 12, 2, 105, 106, 7, 4, 2, 2, 106, 21, 3, 2, 2, 2, 107, 110, 7, 34, 2, 2, 108, 110, 5, 16, 9, 2, 109, 107, 3, 2, 2, 2, 109, 108, 3, 2, 2, 2, 110, 23, 3, 2, 2, 2, 111, 112, 7, 22, 2, 2, 112, 113, 7, 9, 2, 2, 113, 114, 7, 34, 2, 2, 114, 25, 3, 2, 2, 2, 115, 128, 7, 23, 2, 2, 116, 128, 7, 24, 2, 2, 117, 128, 7, 25, 2, 2, 118, 128, 7, 26, 2, 2, 119, 128, 7, 27, 2, 2, 120, 128, 7, 28, 2, 2, 121, 128, 7, 29, 2, 2, 122, 128, 7, 30, 2, 2, 123, 128, 7, 31, 2, 2, 124, 128, 7, 32, 2, 2, 125, 128, 7, 33, 2, 2, 126, 128, 5, 24, 13, 2, 127, 115, 3, 2, 2, 2, 127, 116, 3, 2, 2, 2, 127, 117, 3, 2, 2, 2, 127, 118, 3, 2, 2, 2, 127, 119, 3, 2, 2, 2, 127, 120, 3, 2, 2, 2, 127, 121, 3, 2, 2, 2, 127, 122, 3, 2, 2, 2, 127, 123, 3, 2, 2, 2, 127, 124, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 127, 126, 3, 2, 2, 2, 128, 27, 3, 2, 2, 2, 129, 130, 5, 26, 14, 2, 130, 29, 3, 2, 2, 2, 131, 136, 7, 19, 2, 2, 132, 136, 7, 21, 2, 2, 133, 136, 7, 20, 2, 2, 134, 136, 5, 28, 15, 2, 135, 131, 3, 2, 2, 2, 135, 132, 3, 2, 2, 2, 135, 133, 3, 2, 2, 2, 135, 134, 3, 2, 2, 2, 136, 31, 3, 2, 2, 2, 137, 138, 5, 22, 12, 2, 138, 147, 7, 34, 2, 2, 139, 141, 7, 5, 2, 2, 140, 142, 5, 30, 16, 2, 141, 140, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 143, 141, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 146, 7, 6, 2, 2, 146, 148, 3, 2, 2, 2, 147, 139, 3, 2, 2, 2, 147, 148, 3, 2, 2, 2, 148, 33, 3, 2, 2, 2, 149, 150, 5, 32, 17, 2, 150, 35, 3, 2, 2, 2, 151, 154, 5, 4, 3, 2, 152, 154, 5, 6, 4, 2, 153, 151, 3, 2, 2, 2, 153, 152, 3, 2, 2, 2, 154, 37, 3, 2, 2, 2, 155, 157, 5, 36, 19, 2, 156, 155, 3, 2, 2, 2, 157, 158, 3, 2, 2, 2, 158, 156, 3, 2, 2, 2, 158, 159, 3, 2, 2, 2, 159, 39, 3, 2, 2, 2, 15, 41, 60, 70, 77, 83, 93, 109, 127, 135, 143, 147, 153, 158]
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 39, 168, 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, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 3, 2, 5, 2, 44, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 7, 6, 65, 10, 6, 12, 6, 14, 6, 68, 11, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 7, 7, 75, 10, 7, 12, 7, 14, 7, 78, 11, 7, 3, 8, 3, 8, 3, 8, 3, 9, 5, 9, 84, 10, 9, 3, 9, 3, 9, 7, 9, 88, 10, 9, 12, 9, 14, 9, 91, 11, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 100, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 5, 13, 116, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 134, 10, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 142, 10, 17, 3, 18, 3, 18, 3, 18, 3, 18, 6, 18, 148, 10, 18, 13, 18, 14, 18, 149, 3, 18, 3, 18, 5, 18, 154, 10, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 5, 20, 161, 10, 20, 3, 21, 6, 21, 164, 10, 21, 13, 21, 14, 21, 165, 3, 21, 2, 2, 22, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 2, 2, 2, 176, 2, 43, 3, 2, 2, 2, 4, 47, 3, 2, 2, 2, 6, 51, 3, 2, 2, 2, 8, 55, 3, 2, 2, 2, 10, 62, 3, 2, 2, 2, 12, 71, 3, 2, 2, 2, 14, 79, 3, 2, 2, 2, 16, 83, 3, 2, 2, 2, 18, 99, 3, 2, 2, 2, 20, 101, 3, 2, 2, 2, 22, 106, 3, 2, 2, 2, 24, 115, 3, 2, 2, 2, 26, 117, 3, 2, 2, 2, 28, 133, 3, 2, 2, 2, 30, 135, 3, 2, 2, 2, 32, 141, 3, 2, 2, 2, 34, 143, 3, 2, 2, 2, 36, 155, 3, 2, 2, 2, 38, 160, 3, 2, 2, 2, 40, 163, 3, 2, 2, 2, 42, 44, 5, 40, 21, 2, 43, 42, 3, 2, 2, 2, 43, 44, 3, 2, 2, 2, 44, 45, 3, 2, 2, 2, 45, 46, 7, 2, 2, 3, 46, 3, 3, 2, 2, 2, 47, 48, 7, 13, 2, 2, 48, 49, 7, 36, 2, 2, 49, 50, 5, 16, 9, 2, 50, 5, 3, 2, 2, 2, 51, 52, 7, 14, 2, 2, 52, 53, 7, 36, 2, 2, 53, 54, 5, 16, 9, 2, 54, 7, 3, 2, 2, 2, 55, 56, 7, 15, 2, 2, 56, 57, 7, 36, 2, 2, 57, 58, 7, 3, 2, 2, 58, 59, 5, 24, 13, 2, 59, 60, 7, 4, 2, 2, 60, 61, 5, 10, 6, 2, 61, 9, 3, 2, 2, 2, 62, 66, 7, 7, 2, 2, 63, 65, 7, 36, 2, 2, 64, 63, 3, 2, 2, 2, 65, 68, 3, 2, 2, 2, 66, 64, 3, 2, 2, 2, 66, 67, 3, 2, 2, 2, 67, 69, 3, 2, 2, 2, 68, 66, 3, 2, 2, 2, 69, 70, 7, 8, 2, 2, 70, 11, 3, 2, 2, 2, 71, 76, 7, 36, 2, 2, 72, 73, 7, 10, 2, 2, 73, 75, 7, 36, 2, 2, 74, 72, 3, 2, 2, 2, 75, 78, 3, 2, 2, 2, 76, 74, 3, 2, 2, 2, 76, 77, 3, 2, 2, 2, 77, 13, 3, 2, 2, 2, 78, 76, 3, 2, 2, 2, 79, 80, 7, 3, 2, 2, 80, 81, 5, 12, 7, 2, 81, 15, 3, 2, 2, 2, 82, 84, 5, 14, 8, 2, 83, 82, 3, 2, 2, 2, 83, 84, 3, 2, 2, 2, 84, 85, 3, 2, 2, 2, 85, 89, 7, 7, 2, 2, 86, 88, 5, 36, 19, 2, 87, 86, 3, 2, 2, 2, 88, 91, 3, 2, 2, 2, 89, 87, 3, 2, 2, 2, 89, 90, 3, 2, 2, 2, 90, 92, 3, 2, 2, 2, 91, 89, 3, 2, 2, 2, 92, 93, 7, 8, 2, 2, 93, 17, 3, 2, 2, 2, 94, 100, 7, 16, 2, 2, 95, 100, 7, 17, 2, 2, 96, 100, 7, 19, 2, 2, 97, 100, 5, 20, 11, 2, 98, 100, 5, 22, 12, 2, 99, 94, 3, 2, 2, 2, 99, 95, 3, 2, 2, 2, 99, 96, 3, 2, 2, 2, 99, 97, 3, 2, 2, 2, 99, 98, 3, 2, 2, 2, 100, 19, 3, 2, 2, 2, 101, 102, 7, 18, 2, 2, 102, 103, 7, 3, 2, 2, 103, 104, 5, 24, 13, 2, 104, 105, 7, 4, 2, 2, 105, 21, 3, 2, 2, 2, 106, 107, 7, 20, 2, 2, 107, 108, 7, 3, 2, 2, 108, 109, 5, 24, 13, 2, 109, 110, 7, 10, 2, 2, 110, 111, 5, 24, 13, 2, 111, 112, 7, 4, 2, 2, 112, 23, 3, 2, 2, 2, 113, 116, 7, 36, 2, 2, 114, 116, 5, 18, 10, 2, 115, 113, 3, 2, 2, 2, 115, 114, 3, 2, 2, 2, 116, 25, 3, 2, 2, 2, 117, 118, 7, 24, 2, 2, 118, 119, 7, 9, 2, 2, 119, 120, 7, 36, 2, 2, 120, 27, 3, 2, 2, 2, 121, 134, 7, 25, 2, 2, 122, 134, 7, 26, 2, 2, 123, 134, 7, 27, 2, 2, 124, 134, 7, 28, 2, 2, 125, 134, 7, 29, 2, 2, 126, 134, 7, 30, 2, 2, 127, 134, 7, 31, 2, 2, 128, 134, 7, 32, 2, 2, 129, 134, 7, 33, 2, 2, 130, 134, 7, 34, 2, 2, 131, 134, 7, 35, 2, 2, 132, 134, 5, 26, 14, 2, 133, 121, 3, 2, 2, 2, 133, 122, 3, 2, 2, 2, 133, 123, 3, 2, 2, 2, 133, 124, 3, 2, 2, 2, 133, 125, 3, 2, 2, 2, 133, 126, 3, 2, 2, 2, 133, 127, 3, 2, 2, 2, 133, 128, 3, 2, 2, 2, 133, 129, 3, 2, 2, 2, 133, 130, 3, 2, 2, 2, 133, 131, 3, 2, 2, 2, 133, 132, 3, 2, 2, 2, 134, 29, 3, 2, 2, 2, 135, 136, 5, 28, 15, 2, 136, 31, 3, 2, 2, 2, 137, 142, 7, 21, 2, 2, 138, 142, 7, 23, 2, 2, 139, 142, 7, 22, 2, 2, 140, 142, 5, 30, 16, 2, 141, 137, 3, 2, 2, 2, 141, 138, 3, 2, 2, 2, 141, 139, 3, 2, 2, 2, 141, 140, 3, 2, 2, 2, 142, 33, 3, 2, 2, 2, 143, 144, 5, 24, 13, 2, 144, 153, 7, 36, 2, 2, 145, 147, 7, 12, 2, 2, 146, 148, 5, 32, 17, 2, 147, 146, 3, 2, 2, 2, 148, 149, 3, 2, 2, 2, 149, 147, 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 150, 151, 3, 2, 2, 2, 151, 152, 7, 12, 2, 2, 152, 154, 3, 2, 2, 2, 153, 145, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, 154, 35, 3, 2, 2, 2, 155, 156, 5, 34, 18, 2, 156, 37, 3, 2, 2, 2, 157, 161, 5, 6, 4, 2, 158, 161, 5, 8, 5, 2, 159, 161, 5, 4, 3, 2, 160, 157, 3, 2, 2, 2, 160, 158, 3, 2, 2, 2, 160, 159, 3, 2, 2, 2, 161, 39, 3, 2, 2, 2, 162, 164, 5, 38, 20, 2, 163, 162, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 165, 163, 3, 2, 2, 2, 165, 166, 3, 2, 2, 2, 166, 41, 3, 2, 2, 2, 15, 43, 66, 76, 83, 89, 99, 115, 133, 141, 149, 153, 160, 165]
84 changes: 44 additions & 40 deletions antlr/parser/SwaggableParser.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,34 @@ CloseBrace=6
Dot=7
Comma=8
Underscore=9
ComponentInit=10
EnumInit=11
StringType=12
NumberType=13
ArrayType=14
BooleanType=15
MapType=16
Required=17
Searchable=18
Indexed=19
Format=20
PasswordFormat=21
DateFormat=22
DateTimeFormat=23
ByteFormat=24
BinaryFormat=25
EmailFormat=26
UuidFormat=27
UriFormat=28
HostnameFormat=29
Ipv4Format=30
Ipv6Format=31
Identifier=32
WS=33
COMMENT=34
LINE_COMMENT=35
Tick=10
BaseInit=11
ComponentInit=12
EnumInit=13
StringType=14
NumberType=15
ArrayType=16
BooleanType=17
MapType=18
Required=19
Searchable=20
Indexed=21
Format=22
PasswordFormat=23
DateFormat=24
DateTimeFormat=25
ByteFormat=26
BinaryFormat=27
EmailFormat=28
UuidFormat=29
UriFormat=30
HostnameFormat=31
Ipv4Format=32
Ipv6Format=33
Identifier=34
WS=35
COMMENT=36
LINE_COMMENT=37
'<'=1
'>'=2
'('=3
Expand All @@ -42,17 +44,19 @@ LINE_COMMENT=35
'.'=7
','=8
'_'=9
'comp'=10
'enum'=11
'map'=16
'format.password'=21
'format.date'=22
'format.datetime'=23
'format.byte'=24
'format.binary'=25
'format.email'=26
'format.uuid'=27
'format.uri'=28
'format.hostname'=29
'format.ipv4'=30
'format.ipv6'=31
'`'=10
'base'=11
'comp'=12
'enum'=13
'map'=18
'format.password'=23
'format.date'=24
'format.datetime'=25
'format.byte'=26
'format.binary'=27
'format.email'=28
'format.uuid'=29
'format.uri'=30
'format.hostname'=31
'format.ipv4'=32
'format.ipv6'=33
Loading

0 comments on commit d50c979

Please sign in to comment.