@@ -7,20 +7,20 @@ export default function grammar(){
77 // SUMMARY
88 // rules = 13
99 // udts = 0
10- // opcodes = 62
10+ // opcodes = 65
1111 // --- ABNF original opcodes
12- // ALT = 6
12+ // ALT = 7
1313 // CAT = 4
1414 // REP = 5
15- // RNM = 17
15+ // RNM = 16
1616 // TLS = 27
17- // TBS = 0
18- // TRG = 3
17+ // TBS = 1
18+ // TRG = 5
1919 // --- SABNF superset opcodes
2020 // UDT = 0
2121 // AND = 0
2222 // NOT = 0
23- // characters = [33 - 126 ]
23+ // characters = [0 - 1114111 ]
2424 // ```
2525 /* OBJECT IDENTIFIER (for internal parser use) */
2626 this . grammarObject = 'grammarObject' ;
@@ -82,7 +82,10 @@ export default function grammar(){
8282 /* template-expression-param-name */
8383 this . rules [ 5 ] . opcodes = [ ] ;
8484 this . rules [ 5 ] . opcodes [ 0 ] = { type : 3 , min : 1 , max : Infinity } ; // REP
85- this . rules [ 5 ] . opcodes [ 1 ] = { type : 4 , index : 6 } ; // RNM(pchar)
85+ this . rules [ 5 ] . opcodes [ 1 ] = { type : 1 , children : [ 2 , 3 , 4 ] } ; // ALT
86+ this . rules [ 5 ] . opcodes [ 2 ] = { type : 5 , min : 0 , max : 121 } ; // TRG
87+ this . rules [ 5 ] . opcodes [ 3 ] = { type : 6 , string : [ 124 ] } ; // TBS
88+ this . rules [ 5 ] . opcodes [ 4 ] = { type : 5 , min : 126 , max : 1114111 } ; // TRG
8689
8790 /* pchar */
8891 this . rules [ 6 ] . opcodes = [ ] ;
@@ -155,14 +158,16 @@ export default function grammar(){
155158 str += "slash = \"/\"\n" ;
156159 str += "path-literal = 1*pchar\n" ;
157160 str += "template-expression = \"{\" template-expression-param-name \"}\"\n" ;
158- str += "template-expression-param-name = 1*pchar \n" ;
161+ str += "template-expression-param-name = 1*( %x00-79 / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI) \n" ;
159162 str += "\n" ;
160163 str += "; Characters definitions (from RFC 3986)\n" ;
161164 str += "pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n" ;
162165 str += "unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n" ;
163166 str += "pct-encoded = \"%\" HEXDIG HEXDIG\n" ;
164167 str += "sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n" ;
165168 str += " / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n" ;
169+ str += "\n" ;
170+ str += "; Character definitions (from RFC 5234)\n" ;
166171 str += "ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n" ;
167172 str += "DIGIT = %x30-39 ; 0-9\n" ;
168173 str += "HEXDIG = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\n" ;
0 commit comments