ebnf 1.1.2 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +218 -196
  3. data/UNLICENSE +1 -1
  4. data/VERSION +1 -1
  5. data/bin/ebnf +40 -21
  6. data/etc/abnf-core.ebnf +52 -0
  7. data/etc/abnf.abnf +121 -0
  8. data/etc/abnf.ebnf +124 -0
  9. data/etc/abnf.sxp +45 -0
  10. data/etc/doap.ttl +23 -15
  11. data/etc/ebnf.ebnf +21 -33
  12. data/etc/ebnf.html +171 -160
  13. data/etc/{ebnf.rb → ebnf.ll1.rb} +30 -107
  14. data/etc/ebnf.ll1.sxp +182 -183
  15. data/etc/ebnf.peg.rb +90 -0
  16. data/etc/ebnf.peg.sxp +84 -0
  17. data/etc/ebnf.sxp +40 -41
  18. data/etc/iso-ebnf.ebnf +140 -0
  19. data/etc/iso-ebnf.isoebnf +138 -0
  20. data/etc/iso-ebnf.sxp +65 -0
  21. data/etc/sparql.ebnf +4 -4
  22. data/etc/sparql.html +1603 -1751
  23. data/etc/sparql.ll1.sxp +7372 -7372
  24. data/etc/sparql.peg.rb +532 -0
  25. data/etc/sparql.peg.sxp +597 -0
  26. data/etc/sparql.sxp +363 -362
  27. data/etc/turtle.ebnf +3 -3
  28. data/etc/turtle.html +465 -517
  29. data/etc/{turtle.rb → turtle.ll1.rb} +3 -4
  30. data/etc/turtle.ll1.sxp +425 -425
  31. data/etc/turtle.peg.rb +182 -0
  32. data/etc/turtle.peg.sxp +199 -0
  33. data/etc/turtle.sxp +103 -101
  34. data/lib/ebnf.rb +7 -2
  35. data/lib/ebnf/abnf.rb +301 -0
  36. data/lib/ebnf/abnf/core.rb +23 -0
  37. data/lib/ebnf/abnf/meta.rb +111 -0
  38. data/lib/ebnf/base.rb +128 -87
  39. data/lib/ebnf/bnf.rb +1 -26
  40. data/lib/ebnf/ebnf/meta.rb +90 -0
  41. data/lib/ebnf/isoebnf.rb +229 -0
  42. data/lib/ebnf/isoebnf/meta.rb +75 -0
  43. data/lib/ebnf/ll1.rb +140 -8
  44. data/lib/ebnf/ll1/lexer.rb +37 -32
  45. data/lib/ebnf/ll1/parser.rb +113 -73
  46. data/lib/ebnf/ll1/scanner.rb +83 -51
  47. data/lib/ebnf/native.rb +320 -0
  48. data/lib/ebnf/parser.rb +285 -302
  49. data/lib/ebnf/peg.rb +39 -0
  50. data/lib/ebnf/peg/parser.rb +561 -0
  51. data/lib/ebnf/peg/rule.rb +241 -0
  52. data/lib/ebnf/rule.rb +453 -163
  53. data/lib/ebnf/terminals.rb +21 -0
  54. data/lib/ebnf/writer.rb +561 -88
  55. metadata +114 -28
  56. data/etc/sparql.rb +0 -45773
@@ -1,3 +1,4 @@
1
+ @base <https://rubygems.org/gems/ebnf> .
1
2
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
2
3
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
3
4
  @prefix dc: <http://purl.org/dc/terms/> .
@@ -7,26 +8,33 @@
7
8
  @prefix ex: <http://example.org/> .
8
9
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
10
 
10
- <http://rubygems.org/gems/ebnf> a doap:Project, earl:TestSubject, earl:Software ;
11
+ <> a doap:Project, earl:TestSubject, earl:Software ;
11
12
  doap:name "ebnf" ;
12
- doap:homepage <http://gkellogg.github.com/ebnf> ;
13
- doap:license <http://creativecommons.org/licenses/publicdomain/> ;
13
+ doap:homepage <https://github.com/dryruby/ebnf> ;
14
+ doap:license <https://unlicense.org/1.0/> ;
14
15
  doap:shortdesc "EBNF parser and parser generator"@en ;
15
- doap:description "EBNF is a Ruby parser for W3C EBNF and a parser generator for compliant LL(1) grammars."@en ;
16
+ doap:description "EBNF is a Ruby parser for W3C EBNF and a parser generator for PEG and LL(1). Also includes parsing modes for ISO EBNF and ABNF."@en ;
16
17
  doap:created "2011-08-29"^^xsd:date ;
17
18
  doap:programming-language "Ruby" ;
18
- doap:implements <http://dbpedia.org/resource/Compiler-compiler> ;
19
+ doap:implements <http://dbpedia.org/resource/Compiler-compiler>,
20
+ <https://en.wikipedia.org/wiki/LL_parser>,
21
+ <https://en.wikipedia.org/wiki/Parsing_expression_grammar>,
22
+ <https://pdos.csail.mit.edu/~baford/packrat/thesis/>,
23
+ <https://www.w3.org/TR/REC-xml/#sec-notation>,
24
+ <https://en.wikipedia.org/wiki/Backus–Naur_form>,
25
+ <https://www.iso.org/standard/26153.html>,
26
+ <https://www.rfc-editor.org/rfc/rfc5234>;
19
27
  doap:category <http://dbpedia.org/resource/Resource_Description_Framework>,
20
28
  <http://dbpedia.org/resource/Ruby_(programming_language)> ;
21
- doap:download-page <http://rubygems.org/gems/ebnf> ;
22
- doap:mailing-list <http://lists.w3.org/Archives/Public/public-rdf-ruby/> ;
23
- doap:bug-database <http://github.com/gkellogg/ebnf/issues> ;
24
- doap:blog <http://greggkellogg.net/> ;
25
- doap:developer <http://greggkellogg.net/foaf#me> ;
26
- doap:maintainer <http://greggkellogg.net/foaf#me> ;
27
- doap:documenter <http://greggkellogg.net/foaf#me> ;
28
- foaf:maker <http://greggkellogg.net/foaf#me> ;
29
+ doap:download-page <> ;
30
+ doap:mailing-list <https://lists.w3.org/Archives/Public/public-rdf-ruby/> ;
31
+ doap:bug-database <https://github.com/dryruby/ebnf/issues> ;
32
+ doap:blog <https://greggkellogg.net/> ;
33
+ doap:developer <https://greggkellogg.net/foaf#me> ;
34
+ doap:maintainer <https://greggkellogg.net/foaf#me> ;
35
+ doap:documenter <https://greggkellogg.net/foaf#me> ;
36
+ foaf:maker <https://greggkellogg.net/foaf#me> ;
29
37
  dc:title "ebnf" ;
30
- dc:description "EBNF is a Ruby parser for W3C EBNF and a parser generator for compliant LL(1) grammars."@en ;
38
+ dc:description "EBNF is a Ruby parser for W3C EBNF and a parser generator for PEG and LL(1). Also includes parsing modes for ISO EBNF and ABNF."@en ;
31
39
  dc:date "2011-08-29"^^xsd:date ;
32
- dc:creator <http://greggkellogg.net/foaf#me> .
40
+ dc:creator <https://greggkellogg.net/foaf#me> .
@@ -3,11 +3,13 @@
3
3
 
4
4
  [2] declaration ::= '@terminals' | pass
5
5
 
6
+ # Use the LHS terminal to match the identifier, rule name and assignment due to
7
+ # confusion between the identifier and RANGE.
8
+ # Note, for grammars not using identifiers, it is still possible to confuse
9
+ # a rule ending with a range the next rule, as it may be interpreted as an identifier.
10
+ # In such case, best to enclose the rule in '()'.
6
11
  [3] rule ::= LHS expression
7
12
 
8
- # Use a terminal to match the identifier, rule name and assignment due to
9
- # confusion between the identifier RANGE
10
-
11
13
  [4] expression ::= alt
12
14
 
13
15
  [5] alt ::= seq ('|' seq)*
@@ -20,10 +22,8 @@
20
22
 
21
23
  [9] primary ::= HEX
22
24
  | SYMBOL
23
- | ENUM
24
- | O_ENUM
25
- | RANGE
26
25
  | O_RANGE
26
+ | RANGE
27
27
  | STRING1
28
28
  | STRING2
29
29
  | '(' expression ')'
@@ -32,43 +32,31 @@
32
32
 
33
33
  @terminals
34
34
 
35
- [11] LHS ::= ('[' SYMBOL+ ']')? SYMBOL "::="
35
+ [11] LHS ::= ('[' SYMBOL ']' ' '+)? SYMBOL ' '* '::='
36
36
 
37
- [12] SYMBOL ::= ([a-z] | [A-Z] | [0-9] | "_" | ".")+
37
+ [12] SYMBOL ::= ([a-z] | [A-Z] | [0-9] | '_' | '.')+
38
38
 
39
- [13] HEX ::= '#x' ([0-9]|[a-f]|[A-F])+
39
+ [13] HEX ::= '#x' ([a-f] | [A-F] | [0-9])+
40
40
 
41
- [14] ENUM ::= '[' ((R_BEGIN (HEX | R_CHAR)) | (HEX | R_CHAR)) '-' ((R_BEGIN (HEX | R_CHAR)) | (HEX | R_CHAR)) ']'
41
+ [14] RANGE ::= '[' ((R_CHAR '-' R_CHAR) | (HEX '-' HEX) | R_CHAR | HEX)+ '-'? ']' - LHS
42
42
 
43
- [15] O_ENUM ::= '[^' ((R_BEGIN (HEX | R_CHAR)) | (HEX | R_CHAR)) '-' ((R_BEGIN (HEX | R_CHAR)) | (HEX | R_CHAR)) ']'
44
-
45
- # Range is any combination of R_CHAR '-' R_CHAR or R_CHAR+
46
- [16] RANGE ::= '[' ((R_BEGIN (HEX | R_CHAR)) | (HEX | R_CHAR))+ ']'
47
-
48
- # Range is any combination of R_CHAR '-' R_CHAR or R_CHAR+ preceded by ^
49
- [17] O_RANGE ::= '[^' ((R_BEGIN (HEX | R_CHAR)) | (HEX | R_CHAR))+ ']'
43
+ [15] O_RANGE ::= '[^' ((R_CHAR '-' R_CHAR) | (HEX '-' HEX) | R_CHAR | HEX)+ '-'? ']'
50
44
 
51
45
  # Strings are unescaped Unicode, excepting control characters and hash (#)
52
- [18] STRING1 ::= '"' (CHAR - '"')* '"'
53
-
54
- [19] STRING2 ::= "'" (CHAR - "'")* "'"
46
+ [16] STRING1 ::= '"' (CHAR - '"')* '"'
55
47
 
56
- [20] CHAR ::= HEX
57
- | [#x20#x21#x22]
58
- | [#x24-#x00FFFFFF]
48
+ [17] STRING2 ::= "'" (CHAR - "'")* "'"
59
49
 
60
- [21] R_CHAR ::= CHAR - ']'
50
+ [18] CHAR ::= [#x9#xA#xD] | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
61
51
 
62
- [22] R_BEGIN ::= (HEX | R_CHAR) "-"
52
+ [19] R_CHAR ::= CHAR - (']' | '-' | HEX)
63
53
 
64
- # Should be able to do this inline, but not until terminal regular expressions are created automatically
65
- [23] POSTFIX ::= [?*+]
54
+ [20] POSTFIX ::= [?*+]
66
55
 
67
- [24] PASS ::= ( [#x00-#x20]
68
- | ( '#' | '//' ) [^#x0A#x0D]*
69
- | '/*' (( '*' [^/] )? | [^*] )* '*/'
70
- | '(*' (( '*' [^)] )? | [^*] )* '*)'
71
- )+
56
+ # Ignore all whitespace and comments between non-terminals
57
+ [21] PASS ::= [#x9#xA#xD#x20]
58
+ | ( ('#' - '#x') | '//' ) [^#xA#xD]*
59
+ | '/*' (( '*' [^/] )? | [^*] )* '*/'
60
+ | '(*' (( '*' [^)] )? | [^*] )* '*)'
72
61
 
73
- # Should be able to do this inline, but not until terminal regular expressions are created automatically
74
62
  @pass PASS
@@ -1,241 +1,252 @@
1
- <table class='grammar'>
2
- <tbody id='grammar-productions'>
3
- <tr id='grammar-production-ebnf'>
1
+
2
+ <table class="grammar">
3
+ <tbody id="grammar-productions" class="ebnf">
4
+ <tr id="grammar-production-ebnf">
4
5
  <td>[1]</td>
5
6
  <td><code>ebnf</code></td>
6
7
  <td>::=</td>
7
- <td>
8
- (<a href="#grammar-production-declaration">declaration</a> <code>|</code> <a href="#grammar-production-rule">rule</a>)<code>*</code>
9
- </td>
8
+ <td><code>(</code> <a href="#grammar-production-declaration">declaration</a> <code>|</code> <a href="#grammar-production-rule">rule</a><code>)</code> <code>*</code> </td>
10
9
  </tr>
11
- <tr id='grammar-production-declaration'>
10
+ <tr id="grammar-production-declaration">
12
11
  <td>[2]</td>
13
12
  <td><code>declaration</code></td>
14
13
  <td>::=</td>
15
- <td>
16
- "<code class="grammar-literal">@terminals</code>"
17
- <code>|</code> <a href="#grammar-production-pass">pass</a>
18
- </td>
14
+ <td>"@terminals" <code>|</code> <a href="#grammar-production-pass">pass</a></td>
19
15
  </tr>
20
- <tr id='grammar-production-rule'>
16
+ <tr id="grammar-production-rule">
21
17
  <td>[3]</td>
22
18
  <td><code>rule</code></td>
23
19
  <td>::=</td>
24
- <td>
25
- <a href="#grammar-production-LHS">LHS</a>
26
- <a href="#grammar-production-expression">expression</a>
27
- </td>
20
+ <td><a href="#grammar-production-LHS">LHS</a> <a href="#grammar-production-expression">expression</a></td>
28
21
  </tr>
29
- <tr id='grammar-production-expression'>
22
+ <tr id="grammar-production-expression">
30
23
  <td>[4]</td>
31
24
  <td><code>expression</code></td>
32
25
  <td>::=</td>
33
- <td>
34
- <a href="#grammar-production-alt">alt</a>
35
- </td>
26
+ <td><a href="#grammar-production-alt">alt</a></td>
36
27
  </tr>
37
- <tr id='grammar-production-alt'>
28
+ <tr id="grammar-production-alt">
38
29
  <td>[5]</td>
39
30
  <td><code>alt</code></td>
40
31
  <td>::=</td>
41
- <td>
42
- <a href="#grammar-production-seq">seq</a>
43
- ("<code class="grammar-literal">|</code>" <a href="#grammar-production-seq">seq</a>)<code>*</code>
44
- </td>
32
+ <td><a href="#grammar-production-seq">seq</a> <code>(</code> "<code class="grammar-literal">|</code>" <a href="#grammar-production-seq">seq</a><code>)</code> <code>*</code> </td>
45
33
  </tr>
46
- <tr id='grammar-production-seq'>
34
+ <tr id="grammar-production-seq">
47
35
  <td>[6]</td>
48
36
  <td><code>seq</code></td>
49
37
  <td>::=</td>
50
- <td>
51
- <a href="#grammar-production-diff">diff</a><code>+</code>
52
- </td>
38
+ <td><a href="#grammar-production-diff">diff</a><code>+</code> </td>
53
39
  </tr>
54
- <tr id='grammar-production-diff'>
40
+ <tr id="grammar-production-diff">
55
41
  <td>[7]</td>
56
42
  <td><code>diff</code></td>
57
43
  <td>::=</td>
58
- <td>
59
- <a href="#grammar-production-postfix">postfix</a>
60
- ("<code class="grammar-literal">-</code>" <a href="#grammar-production-postfix">postfix</a>)<code>?</code>
61
- </td>
44
+ <td><a href="#grammar-production-postfix">postfix</a> <code>(</code> "<code class="grammar-literal">-</code>" <a href="#grammar-production-postfix">postfix</a><code>)</code> <code>?</code> </td>
62
45
  </tr>
63
- <tr id='grammar-production-postfix'>
46
+ <tr id="grammar-production-postfix">
64
47
  <td>[8]</td>
65
48
  <td><code>postfix</code></td>
66
49
  <td>::=</td>
67
- <td>
68
- <a href="#grammar-production-primary">primary</a>
69
- <a href="#grammar-production-POSTFIX">POSTFIX</a><code>?</code>
70
- </td>
50
+ <td><a href="#grammar-production-primary">primary</a> <a href="#grammar-production-POSTFIX">POSTFIX</a><code>?</code> </td>
71
51
  </tr>
72
- <tr id='grammar-production-primary'>
52
+ <tr id="grammar-production-primary">
73
53
  <td>[9]</td>
74
54
  <td><code>primary</code></td>
75
55
  <td>::=</td>
76
- <td>
77
- <a href="#grammar-production-HEX">HEX</a>
78
- <code>|</code> <a href="#grammar-production-SYMBOL">SYMBOL</a>
79
- <code>|</code> <a href="#grammar-production-ENUM">ENUM</a>
80
- <code>|</code> <a href="#grammar-production-O_ENUM">O_ENUM</a>
81
- <code>|</code> <a href="#grammar-production-RANGE">RANGE</a>
82
- <code>|</code> <a href="#grammar-production-O_RANGE">O_RANGE</a>
83
- <code>|</code> <a href="#grammar-production-STRING1">STRING1</a>
84
- <code>|</code> <a href="#grammar-production-STRING2">STRING2</a>
85
- <code>|</code> "<code class="grammar-literal">(</code>" <a href="#grammar-production-expression">expression</a> "<code class="grammar-literal">)</code>"
86
- </td>
87
- </tr>
88
- <tr id='grammar-production-pass'>
56
+ <td><a href="#grammar-production-HEX">HEX</a></td>
57
+ </tr>
58
+ <tr>
59
+ <td>[9]</td>
60
+ <td><code></code></td>
61
+ <td>|</td>
62
+ <td><a href="#grammar-production-SYMBOL">SYMBOL</a></td>
63
+ </tr>
64
+ <tr>
65
+ <td>[9]</td>
66
+ <td><code></code></td>
67
+ <td>|</td>
68
+ <td><a href="#grammar-production-O_RANGE">O_RANGE</a></td>
69
+ </tr>
70
+ <tr>
71
+ <td>[9]</td>
72
+ <td><code></code></td>
73
+ <td>|</td>
74
+ <td><a href="#grammar-production-RANGE">RANGE</a></td>
75
+ </tr>
76
+ <tr>
77
+ <td>[9]</td>
78
+ <td><code></code></td>
79
+ <td>|</td>
80
+ <td><a href="#grammar-production-STRING1">STRING1</a></td>
81
+ </tr>
82
+ <tr>
83
+ <td>[9]</td>
84
+ <td><code></code></td>
85
+ <td>|</td>
86
+ <td><a href="#grammar-production-STRING2">STRING2</a></td>
87
+ </tr>
88
+ <tr>
89
+ <td>[9]</td>
90
+ <td><code></code></td>
91
+ <td>|</td>
92
+ <td><code>(</code> "<code class="grammar-literal">(</code>" <a href="#grammar-production-expression">expression</a> "<code class="grammar-literal">)</code>"<code>)</code> </td>
93
+ </tr>
94
+ <tr id="grammar-production-pass">
89
95
  <td>[10]</td>
90
96
  <td><code>pass</code></td>
91
97
  <td>::=</td>
92
- <td>
93
- "<code class="grammar-literal">@pass</code>"
94
- <a href="#grammar-production-expression">expression</a>
95
- </td>
98
+ <td>"@pass" <a href="#grammar-production-expression">expression</a></td>
99
+ </tr>
100
+ <tr id="grammar-production-">
101
+ <td>@terminals</td>
102
+ <td><code></code></td>
103
+ <td></td>
104
+ <td><strong>Productions for terminals</strong></td>
96
105
  </tr>
97
- <tr id='grammar-production-LHS'>
106
+ <tr id="grammar-production-LHS">
98
107
  <td>[11]</td>
99
108
  <td><code>LHS</code></td>
100
109
  <td>::=</td>
101
- <td>
102
- ("<code class="grammar-literal">[</code>" <a href="#grammar-production-SYMBOL">SYMBOL</a><code>+</code> "<code class="grammar-literal">]</code>")<code>?</code>
103
- <a href="#grammar-production-SYMBOL">SYMBOL</a>
104
- "<code class="grammar-literal">::=</code>"
105
- </td>
110
+ <td><code>(</code> "<code class="grammar-literal">[</code>" <a href="#grammar-production-SYMBOL">SYMBOL</a> "<code class="grammar-literal">]</code>" <code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code>+</code> <code>)</code> <code>?</code> <a href="#grammar-production-SYMBOL">SYMBOL</a> <code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code>*</code> "::="</td>
106
111
  </tr>
107
- <tr id='grammar-production-SYMBOL'>
112
+ <tr id="grammar-production-SYMBOL">
108
113
  <td>[12]</td>
109
114
  <td><code>SYMBOL</code></td>
110
115
  <td>::=</td>
111
- <td>
112
- (<code>[</code> <code class="grammar-literal">a-z</code><code>]</code> <code>|</code> <code>[</code> <code class="grammar-literal">A-Z</code><code>]</code> <code>|</code> <code>[</code> <code class="grammar-literal">0-9</code><code>]</code> <code>|</code> "<code class="grammar-literal">_</code>" <code>|</code> "<code class="grammar-literal">.</code>")<code>+</code>
113
- </td>
116
+ <td><code>(</code> <code>[</code> <code class="grammar-literal">a-z</code><code>]</code> <code>|</code> <code>[</code> <code class="grammar-literal">A-Z</code><code>]</code> <code>|</code> <code>[</code> <code class="grammar-literal">0-9</code><code>]</code> <code>|</code> "<code class="grammar-literal">_</code>" <code>|</code> "<code class="grammar-literal">.</code>"<code>)</code> <code>+</code> </td>
114
117
  </tr>
115
- <tr id='grammar-production-HEX'>
118
+ <tr id="grammar-production-HEX">
116
119
  <td>[13]</td>
117
120
  <td><code>HEX</code></td>
118
121
  <td>::=</td>
119
- <td>
120
- "<code class="grammar-literal">#x</code>"
121
- (<code>[</code> <code class="grammar-literal">0-9</code><code>]</code> <code>|</code> <code>[</code> <code class="grammar-literal">a-f</code><code>]</code> <code>|</code> <code>[</code> <code class="grammar-literal">A-F</code><code>]</code> )<code>+</code>
122
- </td>
122
+ <td>"#x" <code>(</code> <code>[</code> <code class="grammar-literal">a-f</code><code>]</code> <code>|</code> <code>[</code> <code class="grammar-literal">A-F</code><code>]</code> <code>|</code> <code>[</code> <code class="grammar-literal">0-9</code><code>]</code> <code>)</code> <code>+</code> </td>
123
123
  </tr>
124
- <tr id='grammar-production-ENUM'>
124
+ <tr id="grammar-production-RANGE">
125
125
  <td>[14]</td>
126
- <td><code>ENUM</code></td>
126
+ <td><code>RANGE</code></td>
127
127
  <td>::=</td>
128
- <td>
129
- "<code class="grammar-literal">[</code>"
130
- <code>(</code> <a href="#grammar-production-R_BEGIN">R_BEGIN</a> <code>(</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code> <code>|</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code>
131
- "<code class="grammar-literal">-</code>"
132
- <code>(</code> <a href="#grammar-production-R_BEGIN">R_BEGIN</a> <code>(</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code> <code>|</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code>
133
- "<code class="grammar-literal">]</code>"
134
- </td>
128
+ <td>"<code class="grammar-literal">[</code>"</td>
129
+ </tr>
130
+ <tr id="grammar-production-">
131
+ <td>[14]</td>
132
+ <td><code></code></td>
133
+ <td></td>
134
+ <td><code>(</code> <code>(</code> <a href="#grammar-production-R_CHAR">R_CHAR</a> "<code class="grammar-literal">-</code>" <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code><code>(</code> <a href="#grammar-production-HEX">HEX</a> "<code class="grammar-literal">-</code>" <a href="#grammar-production-HEX">HEX</a><code>)</code> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a> <code>|</code> <a href="#grammar-production-HEX">HEX</a><code>)</code> <code>+</code></td>
135
+ </tr>
136
+ <tr id="grammar-production-">
137
+ <td>[14]</td>
138
+ <td><code></code></td>
139
+ <td></td>
140
+ <td>"<code class="grammar-literal">-</code>"<code>?</code></td>
141
+ </tr>
142
+ <tr id="grammar-production-">
143
+ <td>[14]</td>
144
+ <td><code></code></td>
145
+ <td></td>
146
+ <td><code>(</code> "<code class="grammar-literal">]</code>" <code>-</code> <a href="#grammar-production-LHS">LHS</a><code>)</code> </td>
135
147
  </tr>
136
- <tr id='grammar-production-O_ENUM'>
148
+ <tr id="grammar-production-O_RANGE">
137
149
  <td>[15]</td>
138
- <td><code>O_ENUM</code></td>
150
+ <td><code>O_RANGE</code></td>
139
151
  <td>::=</td>
140
- <td>
141
- "<code class="grammar-literal">[^</code>"
142
- <code>(</code> <a href="#grammar-production-R_BEGIN">R_BEGIN</a> <code>(</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code> <code>|</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code>
143
- "<code class="grammar-literal">-</code>"
144
- <code>(</code> <a href="#grammar-production-R_BEGIN">R_BEGIN</a> <code>(</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code> <code>|</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code>
145
- "<code class="grammar-literal">]</code>"
146
- </td>
152
+ <td>"[^"</td>
153
+ </tr>
154
+ <tr id="grammar-production-">
155
+ <td>[15]</td>
156
+ <td><code></code></td>
157
+ <td></td>
158
+ <td><code>(</code> <code>(</code> <a href="#grammar-production-R_CHAR">R_CHAR</a> "<code class="grammar-literal">-</code>" <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code><code>(</code> <a href="#grammar-production-HEX">HEX</a> "<code class="grammar-literal">-</code>" <a href="#grammar-production-HEX">HEX</a><code>)</code> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a> <code>|</code> <a href="#grammar-production-HEX">HEX</a><code>)</code> <code>+</code></td>
159
+ </tr>
160
+ <tr id="grammar-production-">
161
+ <td>[15]</td>
162
+ <td><code></code></td>
163
+ <td></td>
164
+ <td>"<code class="grammar-literal">-</code>"<code>?</code></td>
165
+ </tr>
166
+ <tr id="grammar-production-">
167
+ <td>[15]</td>
168
+ <td><code></code></td>
169
+ <td></td>
170
+ <td>"<code class="grammar-literal">]</code>"</td>
147
171
  </tr>
148
- <tr id='grammar-production-RANGE'>
172
+ <tr id="grammar-production-STRING1">
149
173
  <td>[16]</td>
150
- <td><code>RANGE</code></td>
174
+ <td><code>STRING1</code></td>
151
175
  <td>::=</td>
152
- <td>
153
- "<code class="grammar-literal">[</code>"
154
- (<a href="#grammar-production-R_BEGIN">R_BEGIN</a> <code>(</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code> <code>|</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a>)<code>+</code>
155
- "<code class="grammar-literal">]</code>"
156
- </td>
176
+ <td>'<code class="grammar-literal">"</code>' <code>(</code> <a href="#grammar-production-CHAR">CHAR</a> <code>-</code> '<code class="grammar-literal">"</code>'<code>)</code> <code>*</code> '<code class="grammar-literal">"</code>'</td>
157
177
  </tr>
158
- <tr id='grammar-production-O_RANGE'>
178
+ <tr id="grammar-production-STRING2">
159
179
  <td>[17]</td>
160
- <td><code>O_RANGE</code></td>
180
+ <td><code>STRING2</code></td>
161
181
  <td>::=</td>
162
- <td>
163
- "<code class="grammar-literal">[^</code>"
164
- (<a href="#grammar-production-R_BEGIN">R_BEGIN</a> <code>(</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code> <code>|</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a>)<code>+</code>
165
- "<code class="grammar-literal">]</code>"
166
- </td>
182
+ <td>"<code class="grammar-literal">'</code>" <code>(</code> <a href="#grammar-production-CHAR">CHAR</a> <code>-</code> "<code class="grammar-literal">'</code>"<code>)</code> <code>*</code> "<code class="grammar-literal">'</code>"</td>
167
183
  </tr>
168
- <tr id='grammar-production-STRING1'>
184
+ <tr id="grammar-production-CHAR">
169
185
  <td>[18]</td>
170
- <td><code>STRING1</code></td>
186
+ <td><code>CHAR</code></td>
171
187
  <td>::=</td>
172
- <td>
173
- '<code class="grammar-literal">"</code>'
174
- (<a href="#grammar-production-CHAR">CHAR</a> <code>-</code> '<code class="grammar-literal">"</code>')<code>*</code>
175
- '<code class="grammar-literal">"</code>'
176
- </td>
188
+ <td><code>[</code> <code class="grammar-char-escape"><abbr title="horizontal tab">#x09</abbr></code><code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code><code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code><code>]</code></td>
177
189
  </tr>
178
- <tr id='grammar-production-STRING2'>
190
+ <tr>
191
+ <td>[18]</td>
192
+ <td><code></code></td>
193
+ <td>|</td>
194
+ <td><code>[</code> <code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode '퟿'">#xD7FF</abbr></code><code>]</code></td>
195
+ </tr>
196
+ <tr>
197
+ <td>[18]</td>
198
+ <td><code></code></td>
199
+ <td>|</td>
200
+ <td><code>[</code> <code class="grammar-char-escape"><abbr title="unicode ''">#xE000</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode '�'">#xFFFD</abbr></code><code>]</code></td>
201
+ </tr>
202
+ <tr>
203
+ <td>[18]</td>
204
+ <td><code></code></td>
205
+ <td>|</td>
206
+ <td><code>[</code> <code class="grammar-char-escape"><abbr title="unicode '𐀀'">#x00010000</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode '􏿿'">#x0010FFFF</abbr></code><code>]</code> </td>
207
+ </tr>
208
+ <tr id="grammar-production-R_CHAR">
179
209
  <td>[19]</td>
180
- <td><code>STRING2</code></td>
210
+ <td><code>R_CHAR</code></td>
181
211
  <td>::=</td>
182
- <td>
183
- "<code class="grammar-literal">'</code>"
184
- (<a href="#grammar-production-CHAR">CHAR</a> <code>-</code> "<code class="grammar-literal">'</code>")<code>*</code>
185
- "<code class="grammar-literal">'</code>"
186
- </td>
212
+ <td><a href="#grammar-production-CHAR">CHAR</a> <code>-</code> <code>(</code> "<code class="grammar-literal">]</code>" <code>|</code> "<code class="grammar-literal">-</code>" <code>|</code> <a href="#grammar-production-HEX">HEX</a><code>)</code> </td>
187
213
  </tr>
188
- <tr id='grammar-production-CHAR'>
214
+ <tr id="grammar-production-POSTFIX">
189
215
  <td>[20]</td>
190
- <td><code>CHAR</code></td>
216
+ <td><code>POSTFIX</code></td>
191
217
  <td>::=</td>
192
- <td>
193
- <a href="#grammar-production-HEX">HEX</a>
194
- <code>|</code> <code>[</code> <code class="grammar-char-escape">#x20</code><code class="grammar-char-escape">#x21</code><code class="grammar-char-escape">#x22</code><code>]</code>
195
- <code>|</code> <code>[</code> <code class="grammar-char-escape">#x24</code><code class="grammar-literal">-</code><code class="grammar-char-escape">#x00FFFFFF</code><code>]</code>
196
- </td>
218
+ <td><code>[</code> <code class="grammar-literal">?*+</code><code>]</code> </td>
197
219
  </tr>
198
- <tr id='grammar-production-R_CHAR'>
220
+ <tr id="grammar-production-PASS">
199
221
  <td>[21]</td>
200
- <td><code>R_CHAR</code></td>
222
+ <td><code>PASS</code></td>
201
223
  <td>::=</td>
202
- <td>
203
- <a href="#grammar-production-CHAR">CHAR</a>
204
- <code>-</code> "<code class="grammar-literal">]</code>"
205
- </td>
224
+ <td><code>[</code> <code class="grammar-char-escape"><abbr title="horizontal tab">#x09</abbr></code><code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code><code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code>]</code></td>
206
225
  </tr>
207
- <tr id='grammar-production-R_BEGIN'>
208
- <td>[22]</td>
209
- <td><code>R_BEGIN</code></td>
210
- <td>::=</td>
211
- <td>
212
- <code>(</code> <a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a><code>)</code>
213
- "<code class="grammar-literal">-</code>"
214
- </td>
226
+ <tr>
227
+ <td>[21]</td>
228
+ <td><code></code></td>
229
+ <td>|</td>
230
+ <td><code>(</code> <code>(</code> <code>(</code> "<code class="grammar-literal">#</code>" <code>-</code> "#x"<code>)</code> <code>|</code> "//"<code>)</code> <code>[</code> <code class="grammar-literal">^</code><code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code><code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code><code>]</code> <code>*</code> <code>)</code></td>
215
231
  </tr>
216
- <tr id='grammar-production-POSTFIX'>
217
- <td>[23]</td>
218
- <td><code>POSTFIX</code></td>
219
- <td>::=</td>
220
- <td>
221
- <code>[</code> <code class="grammar-literal">?*+</code><code>]</code>
222
- </td>
232
+ <tr>
233
+ <td>[21]</td>
234
+ <td><code></code></td>
235
+ <td>|</td>
236
+ <td><code>(</code> "/*" <code>(</code> <code>(</code> "<code class="grammar-literal">*</code>" <code>[</code> <code class="grammar-literal">^/</code><code>]</code> <code>)</code> <code>?</code> <code>|</code> <code>[</code> <code class="grammar-literal">^*</code><code>]</code> <code>)</code> <code>*</code> "*/"<code>)</code></td>
223
237
  </tr>
224
- <tr id='grammar-production-PASS'>
225
- <td>[24]</td>
226
- <td><code>PASS</code></td>
227
- <td>::=</td>
228
- <td>
229
- (<code>[</code> <code class="grammar-char-escape">#x00</code><code class="grammar-literal">-</code><code class="grammar-char-escape">#x20</code><code>]</code> <code>|</code> <code>(</code> "<code class="grammar-literal">#</code>" <code>|</code> "<code class="grammar-literal">//</code>"<code>)</code> (<code>[</code> <code class="grammar-literal">^</code><code class="grammar-char-escape">#x0A</code><code class="grammar-char-escape">#x0D</code><code>]</code> )<code>*</code> <code>|</code> "<code class="grammar-literal">/*</code>" ("<code class="grammar-literal">*</code>" <code>[</code> <code class="grammar-literal">^/</code><code>]</code> )<code>?</code> <code>|</code> <code>[</code> <code class="grammar-literal">^*</code><code>]</code> <code>*</code> "<code class="grammar-literal">*/</code>" <code>|</code> "<code class="grammar-literal">(*</code>" ("<code class="grammar-literal">*</code>" <code>[</code> <code class="grammar-literal">^)</code><code>]</code> )<code>?</code> <code>|</code> <code>[</code> <code class="grammar-literal">^*</code><code>]</code> <code>*</code> "<code class="grammar-literal">*)</code>")<code>+</code>
230
- </td>
238
+ <tr>
239
+ <td>[21]</td>
240
+ <td><code></code></td>
241
+ <td>|</td>
242
+ <td><code>(</code> "(*" <code>(</code> <code>(</code> "<code class="grammar-literal">*</code>" <code>[</code> <code class="grammar-literal">^)</code><code>]</code> <code>)</code> <code>?</code> <code>|</code> <code>[</code> <code class="grammar-literal">^*</code><code>]</code> <code>)</code> <code>*</code> "*)"<code>)</code> </td>
231
243
  </tr>
232
- <tr id='grammar-production-'>
233
- <td colspan='3'>
234
- <code>@pass</code>
235
- </td>
236
- <td>
237
- <a href="#grammar-production-PASS">PASS</a>
238
- </td>
244
+ <tr id="grammar-production-">
245
+ <td>@pass</td>
246
+ <td><code></code></td>
247
+ <td></td>
248
+ <td></td>
239
249
  </tr>
240
250
  </tbody>
241
251
  </table>
252
+