ebnf 1.1.3 → 2.1.2
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.
- checksums.yaml +4 -4
- data/README.md +221 -198
- data/UNLICENSE +1 -1
- data/VERSION +1 -1
- data/bin/ebnf +40 -21
- data/etc/abnf-core.ebnf +52 -0
- data/etc/abnf.abnf +121 -0
- data/etc/abnf.ebnf +124 -0
- data/etc/abnf.sxp +45 -0
- data/etc/doap.ttl +23 -15
- data/etc/ebnf.ebnf +21 -33
- data/etc/ebnf.html +171 -160
- data/etc/{ebnf.rb → ebnf.ll1.rb} +30 -107
- data/etc/ebnf.ll1.sxp +182 -183
- data/etc/ebnf.peg.rb +90 -0
- data/etc/ebnf.peg.sxp +84 -0
- data/etc/ebnf.sxp +40 -41
- data/etc/iso-ebnf.ebnf +140 -0
- data/etc/iso-ebnf.isoebnf +138 -0
- data/etc/iso-ebnf.sxp +65 -0
- data/etc/sparql.ebnf +4 -4
- data/etc/sparql.html +1603 -1751
- data/etc/sparql.ll1.sxp +7372 -7372
- data/etc/sparql.peg.rb +532 -0
- data/etc/sparql.peg.sxp +597 -0
- data/etc/sparql.sxp +363 -362
- data/etc/turtle.ebnf +3 -3
- data/etc/turtle.html +465 -517
- data/etc/{turtle.rb → turtle.ll1.rb} +3 -4
- data/etc/turtle.ll1.sxp +425 -425
- data/etc/turtle.peg.rb +182 -0
- data/etc/turtle.peg.sxp +199 -0
- data/etc/turtle.sxp +103 -101
- data/lib/ebnf.rb +7 -2
- data/lib/ebnf/abnf.rb +301 -0
- data/lib/ebnf/abnf/core.rb +23 -0
- data/lib/ebnf/abnf/meta.rb +111 -0
- data/lib/ebnf/base.rb +113 -69
- data/lib/ebnf/bnf.rb +1 -26
- data/lib/ebnf/ebnf/meta.rb +90 -0
- data/lib/ebnf/isoebnf.rb +229 -0
- data/lib/ebnf/isoebnf/meta.rb +75 -0
- data/lib/ebnf/ll1.rb +138 -6
- data/lib/ebnf/ll1/lexer.rb +37 -32
- data/lib/ebnf/ll1/parser.rb +113 -73
- data/lib/ebnf/ll1/scanner.rb +83 -51
- data/lib/ebnf/native.rb +320 -0
- data/lib/ebnf/parser.rb +285 -302
- data/lib/ebnf/peg.rb +39 -0
- data/lib/ebnf/peg/parser.rb +561 -0
- data/lib/ebnf/peg/rule.rb +250 -0
- data/lib/ebnf/rule.rb +443 -148
- data/lib/ebnf/terminals.rb +21 -0
- data/lib/ebnf/writer.rb +565 -83
- metadata +107 -29
- data/etc/sparql.rb +0 -45773
data/etc/doap.ttl
CHANGED
@@ -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
|
-
|
11
|
+
<> a doap:Project, earl:TestSubject, earl:Software ;
|
11
12
|
doap:name "ebnf" ;
|
12
|
-
doap:homepage <
|
13
|
-
doap:license <
|
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
|
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
|
22
|
-
doap:mailing-list <
|
23
|
-
doap:bug-database <
|
24
|
-
doap:blog <
|
25
|
-
doap:developer <
|
26
|
-
doap:maintainer <
|
27
|
-
doap:documenter <
|
28
|
-
foaf:maker <
|
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
|
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 <
|
40
|
+
dc:creator <https://greggkellogg.net/foaf#me> .
|
data/etc/ebnf.ebnf
CHANGED
@@ -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
|
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' ([
|
39
|
+
[13] HEX ::= '#x' ([a-f] | [A-F] | [0-9])+
|
40
40
|
|
41
|
-
[14]
|
41
|
+
[14] RANGE ::= '[' ((R_CHAR '-' R_CHAR) | (HEX '-' HEX) | R_CHAR | HEX)+ '-'? ']' - LHS
|
42
42
|
|
43
|
-
[15]
|
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
|
-
[
|
53
|
-
|
54
|
-
[19] STRING2 ::= "'" (CHAR - "'")* "'"
|
46
|
+
[16] STRING1 ::= '"' (CHAR - '"')* '"'
|
55
47
|
|
56
|
-
[
|
57
|
-
| [#x20#x21#x22]
|
58
|
-
| [#x24-#x00FFFFFF]
|
48
|
+
[17] STRING2 ::= "'" (CHAR - "'")* "'"
|
59
49
|
|
60
|
-
[
|
50
|
+
[18] CHAR ::= [#x9#xA#xD] | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
|
61
51
|
|
62
|
-
[
|
52
|
+
[19] R_CHAR ::= CHAR - (']' | '-' | HEX)
|
63
53
|
|
64
|
-
|
65
|
-
[23] POSTFIX ::= [?*+]
|
54
|
+
[20] POSTFIX ::= [?*+]
|
66
55
|
|
67
|
-
|
68
|
-
|
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
|
data/etc/ebnf.html
CHANGED
@@ -1,241 +1,252 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
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=
|
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=
|
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=
|
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=
|
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=
|
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=
|
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=
|
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=
|
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
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|
-
|
94
|
-
|
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=
|
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=
|
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=
|
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=
|
124
|
+
<tr id="grammar-production-RANGE">
|
125
125
|
<td>[14]</td>
|
126
|
-
<td><code>
|
126
|
+
<td><code>RANGE</code></td>
|
127
127
|
<td>::=</td>
|
128
|
-
<td>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
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=
|
148
|
+
<tr id="grammar-production-O_RANGE">
|
137
149
|
<td>[15]</td>
|
138
|
-
<td><code>
|
150
|
+
<td><code>O_RANGE</code></td>
|
139
151
|
<td>::=</td>
|
140
|
-
<td>
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
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=
|
172
|
+
<tr id="grammar-production-STRING1">
|
149
173
|
<td>[16]</td>
|
150
|
-
<td><code>
|
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=
|
178
|
+
<tr id="grammar-production-STRING2">
|
159
179
|
<td>[17]</td>
|
160
|
-
<td><code>
|
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=
|
184
|
+
<tr id="grammar-production-CHAR">
|
169
185
|
<td>[18]</td>
|
170
|
-
<td><code>
|
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
|
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>
|
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=
|
214
|
+
<tr id="grammar-production-POSTFIX">
|
189
215
|
<td>[20]</td>
|
190
|
-
<td><code>
|
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=
|
220
|
+
<tr id="grammar-production-PASS">
|
199
221
|
<td>[21]</td>
|
200
|
-
<td><code>
|
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
|
208
|
-
<td>[
|
209
|
-
<td><code
|
210
|
-
<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
|
217
|
-
<td>[
|
218
|
-
<td><code
|
219
|
-
<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
|
225
|
-
<td>[
|
226
|
-
<td><code
|
227
|
-
<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=
|
233
|
-
<td
|
234
|
-
|
235
|
-
|
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
|
+
|