ebnf 2.4.0 → 2.5.0
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 +4 -0
- data/VERSION +1 -1
- data/etc/abnf.sxp +1 -1
- data/etc/ebnf.html +13 -13
- data/etc/ebnf.ll1.rb +1 -1
- data/etc/ebnf.ll1.sxp +94 -94
- data/etc/ebnf.peg.rb +1 -1
- data/etc/ebnf.peg.sxp +29 -29
- data/etc/ebnf.sxp +18 -18
- data/etc/iso-ebnf.sxp +27 -27
- data/etc/sparql.sxp +195 -195
- data/etc/turtle.ebnf +70 -67
- data/etc/turtle.html +56 -106
- data/etc/turtle.peg.sxp +182 -191
- data/etc/turtle.sxp +64 -70
- data/lib/ebnf/abnf.rb +3 -3
- data/lib/ebnf/base.rb +1 -1
- data/lib/ebnf/isoebnf.rb +1 -1
- data/lib/ebnf/native.rb +3 -2
- data/lib/ebnf/parser.rb +4 -2
- data/lib/ebnf/rule.rb +1 -2
- data/lib/ebnf/unescape.rb +1 -1
- data/lib/ebnf/writer.rb +9 -7
- data/lib/ebnf.rb +2 -0
- metadata +5 -12
- data/etc/sparql.html +0 -1425
- data/etc/sparql.ll1.sxp +0 -7372
- data/etc/sparql.peg.rb +0 -532
- data/etc/sparql.peg.sxp +0 -597
- data/etc/turtle.ll1.rb +0 -1482
- data/etc/turtle.ll1.sxp +0 -425
- data/etc/turtle.peg.rb +0 -182
data/etc/ebnf.sxp
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
(
|
2
2
|
(rule ebnf "1" (star (alt declaration rule)))
|
3
|
-
(rule declaration "2" (alt
|
3
|
+
(rule declaration "2" (alt '@terminals' pass))
|
4
4
|
(rule rule "3" (seq LHS expression))
|
5
5
|
(rule expression "4" (seq alt))
|
6
|
-
(rule alt "5" (seq seq (star (seq
|
6
|
+
(rule alt "5" (seq seq (star (seq '|' seq))))
|
7
7
|
(rule seq "6" (plus diff))
|
8
|
-
(rule diff "7" (seq postfix (opt (seq
|
8
|
+
(rule diff "7" (seq postfix (opt (seq '-' postfix))))
|
9
9
|
(rule postfix "8" (seq primary (opt POSTFIX)))
|
10
10
|
(rule primary "9"
|
11
|
-
(alt HEX SYMBOL O_RANGE RANGE STRING1 STRING2 (seq
|
12
|
-
(rule pass "10" (seq
|
11
|
+
(alt HEX SYMBOL O_RANGE RANGE STRING1 STRING2 (seq '(' expression ')')))
|
12
|
+
(rule pass "10" (seq '@pass' expression))
|
13
13
|
(terminals _terminals (seq))
|
14
|
-
(terminal LHS "11" (seq (opt (seq
|
15
|
-
(terminal SYMBOL "12" (plus (alt (range "a-z") (range "A-Z") (range "0-9")
|
16
|
-
(terminal HEX "13" (seq
|
14
|
+
(terminal LHS "11" (seq (opt (seq '[' SYMBOL ']' (plus ' '))) SYMBOL (star ' ') '::='))
|
15
|
+
(terminal SYMBOL "12" (plus (alt (range "a-z") (range "A-Z") (range "0-9") '_' '.')))
|
16
|
+
(terminal HEX "13" (seq '#x' (plus (alt (range "a-f") (range "A-F") (range "0-9")))))
|
17
17
|
(terminal RANGE "14"
|
18
|
-
(seq
|
19
|
-
(plus (alt (seq R_CHAR
|
20
|
-
(opt
|
21
|
-
(diff
|
18
|
+
(seq '['
|
19
|
+
(plus (alt (seq R_CHAR '-' R_CHAR) (seq HEX '-' HEX) R_CHAR HEX))
|
20
|
+
(opt '-')
|
21
|
+
(diff ']' LHS)) )
|
22
22
|
(terminal O_RANGE "15"
|
23
|
-
(seq
|
24
|
-
(terminal STRING1 "16" (seq "
|
23
|
+
(seq '[^' (plus (alt (seq R_CHAR '-' R_CHAR) (seq HEX '-' HEX) R_CHAR HEX)) (opt '-') ']'))
|
24
|
+
(terminal STRING1 "16" (seq '"' (star (diff CHAR '"')) '"'))
|
25
25
|
(terminal STRING2 "17" (seq "'" (star (diff CHAR "'")) "'"))
|
26
26
|
(terminal CHAR "18"
|
27
27
|
(alt
|
@@ -29,12 +29,12 @@
|
|
29
29
|
(range "#x20-#xD7FF")
|
30
30
|
(range "#xE000-#xFFFD")
|
31
31
|
(range "#x10000-#x10FFFF")) )
|
32
|
-
(terminal R_CHAR "19" (diff CHAR (alt
|
32
|
+
(terminal R_CHAR "19" (diff CHAR (alt ']' '-' HEX)))
|
33
33
|
(terminal POSTFIX "20" (range "?*+"))
|
34
34
|
(terminal PASS "21"
|
35
35
|
(alt
|
36
36
|
(range "#x9#xA#xD#x20")
|
37
|
-
(seq (alt (diff
|
38
|
-
(seq
|
39
|
-
(seq
|
37
|
+
(seq (alt (diff '#' '#x') '//') (star (range "^#xA#xD")))
|
38
|
+
(seq '/*' (star (alt (opt (seq '*' (range "^/"))) (range "^*"))) '*/')
|
39
|
+
(seq '(*' (star (alt (opt (seq '*' (range "^)"))) (range "^*"))) '*)')) )
|
40
40
|
(pass _pass (seq PASS)))
|
data/etc/iso-ebnf.sxp
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
(seq meta_identifier defining_symbol definitions_list terminator_symbol))
|
5
5
|
(rule definitions_list
|
6
6
|
(seq single_definition (star (seq definition_separator_symbol definitions_list))))
|
7
|
-
(rule single_definition (seq term (star (seq
|
8
|
-
(rule term (seq factor (opt (seq
|
7
|
+
(rule single_definition (seq term (star (seq ',' term))))
|
8
|
+
(rule term (seq factor (opt (seq '-' exception))))
|
9
9
|
(rule exception (seq factor))
|
10
|
-
(rule factor (seq (opt (seq integer
|
10
|
+
(rule factor (seq (opt (seq integer '*')) primary))
|
11
11
|
(rule primary
|
12
12
|
(alt optional_sequence repeated_sequence special_sequence grouped_sequence
|
13
13
|
meta_identifier terminal_string empty ))
|
@@ -15,25 +15,25 @@
|
|
15
15
|
(seq start_option_symbol definitions_list end_option_symbol))
|
16
16
|
(rule repeated_sequence
|
17
17
|
(seq start_repeat_symbol definitions_list end_repeat_symbol))
|
18
|
-
(rule grouped_sequence (seq
|
18
|
+
(rule grouped_sequence (seq '(' definitions_list ')'))
|
19
19
|
(terminals _terminals (seq))
|
20
20
|
(terminal terminal_string
|
21
21
|
(alt
|
22
22
|
(seq "'" (plus first_terminal_character) "'")
|
23
|
-
(seq "
|
23
|
+
(seq '"' (plus second_terminal_character) '"')) )
|
24
24
|
(terminal meta_identifier (seq letter (star meta_identifier_character)))
|
25
25
|
(terminal integer (plus decimal_digit))
|
26
|
-
(terminal special_sequence (seq
|
26
|
+
(terminal special_sequence (seq '?' (star special_sequence_character) '?'))
|
27
27
|
(terminal comment (seq start_comment_symbol (star comment_symbol) end_comment_symbol))
|
28
28
|
(terminal comment_symbol (alt comment commentless_symbol other_character))
|
29
29
|
(terminal commentless_symbol
|
30
30
|
(alt terminal_character meta_identifier integer terminal_string special_sequence))
|
31
31
|
(terminal letter (range "a-zA-Z"))
|
32
32
|
(terminal decimal_digit (range "0-9"))
|
33
|
-
(terminal meta_identifier_character (alt letter decimal_digit
|
33
|
+
(terminal meta_identifier_character (alt letter decimal_digit '_'))
|
34
34
|
(terminal first_terminal_character (diff terminal_character "'"))
|
35
|
-
(terminal second_terminal_character (diff terminal_character "
|
36
|
-
(terminal special_sequence_character (diff terminal_character
|
35
|
+
(terminal second_terminal_character (diff terminal_character '"'))
|
36
|
+
(terminal special_sequence_character (diff terminal_character '?'))
|
37
37
|
(terminal terminal_character
|
38
38
|
(alt letter decimal_digit concatenate_symbol defining_symbol
|
39
39
|
definition_separator_symbol end_comment_symbol end_group_symbol
|
@@ -41,25 +41,25 @@
|
|
41
41
|
repetition_symbol second_quote_symbol special_sequence_symbol
|
42
42
|
start_comment_symbol start_group_symbol start_option_symbol
|
43
43
|
start_repeat_symbol terminator_symbol other_character ))
|
44
|
-
(terminal other_character (alt (range ":+_%@&$<>^` ̃#x20#x23")
|
44
|
+
(terminal other_character (alt (range ":+_%@&$<>^` ̃#x20#x23") '\\'))
|
45
45
|
(terminal gap_separator (range "#x9#xa#xb#xc#xd#x20"))
|
46
46
|
(pass _pass (alt (plus gap_separator) comment))
|
47
|
-
(terminal empty (seq
|
48
|
-
(terminal concatenate_symbol (seq
|
49
|
-
(terminal repetition_symbol (seq
|
50
|
-
(terminal except_symbol (seq
|
47
|
+
(terminal empty (seq ''))
|
48
|
+
(terminal concatenate_symbol (seq ','))
|
49
|
+
(terminal repetition_symbol (seq '*'))
|
50
|
+
(terminal except_symbol (seq '-'))
|
51
51
|
(terminal first_quote_symbol (seq "'"))
|
52
|
-
(terminal second_quote_symbol (seq "
|
53
|
-
(terminal start_comment_symbol (seq
|
54
|
-
(terminal end_comment_symbol (seq
|
55
|
-
(terminal start_group_symbol (seq
|
56
|
-
(terminal end_group_symbol (seq
|
57
|
-
(terminal special_sequence_symbol (seq
|
58
|
-
(terminal defining_symbol (alt
|
59
|
-
(terminal definition_separator_symbol (alt
|
60
|
-
(terminal terminator_symbol (alt
|
61
|
-
(terminal start_option_symbol (seq
|
62
|
-
(terminal end_option_symbol (seq
|
63
|
-
(terminal start_repeat_symbol (alt
|
64
|
-
(terminal end_repeat_symbol (alt
|
52
|
+
(terminal second_quote_symbol (seq '"'))
|
53
|
+
(terminal start_comment_symbol (seq '(*'))
|
54
|
+
(terminal end_comment_symbol (seq '*)'))
|
55
|
+
(terminal start_group_symbol (seq '('))
|
56
|
+
(terminal end_group_symbol (seq ')'))
|
57
|
+
(terminal special_sequence_symbol (seq '?'))
|
58
|
+
(terminal defining_symbol (alt '=' ':'))
|
59
|
+
(terminal definition_separator_symbol (alt '|' '/' '!'))
|
60
|
+
(terminal terminator_symbol (alt ';' '.'))
|
61
|
+
(terminal start_option_symbol (seq '['))
|
62
|
+
(terminal end_option_symbol (seq ']'))
|
63
|
+
(terminal start_repeat_symbol (alt '{' '(:'))
|
64
|
+
(terminal end_repeat_symbol (alt '}' ':)'))
|
65
65
|
(terminal gap_free_symbol (alt (diff terminal_character (range "'\"")) terminal_string)))
|