ebnf 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/ebnf/ll1/lexer.rb +24 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 675c1d0315518a2a8159fb1cdfb3bd0054e2a4eac1a12adae63dbbe02cf2d611
|
4
|
+
data.tar.gz: '0229b65832d59f84c39bfc9770555fb50a3500f5d551ea400bd3ae57df1b408b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e13f53ed30fad026c5fd901a449805089e948838e6aae38b4e3fe87d274f07e19ae9c197a93cba0dc90a57cea4f8b341f13904265ac47a91631a5cc7801e6ec
|
7
|
+
data.tar.gz: 9bb40f43a8a9ff95bbd9d097729db694033217ba1226a403844e9bf5b20ee852b57f8fef54dd200d3ee98847da7a21efcaa675a34fb607c799a901f4798f3085
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.1
|
data/lib/ebnf/ll1/lexer.rb
CHANGED
@@ -38,6 +38,30 @@ module EBNF::LL1
|
|
38
38
|
# @return [Regexp] defines whitespace, including comments, otherwise whitespace must be explicit in terminals
|
39
39
|
attr_reader :whitespace
|
40
40
|
|
41
|
+
##
|
42
|
+
# Returns a copy of the given `input` string with all `\uXXXX` and
|
43
|
+
# `\UXXXXXXXX` Unicode codepoint escape sequences replaced with their
|
44
|
+
# unescaped UTF-8 character counterparts.
|
45
|
+
#
|
46
|
+
# @param [String] string
|
47
|
+
# @return [String]
|
48
|
+
# @see https://www.w3.org/TR/rdf-sparql-query/#codepointEscape
|
49
|
+
def self.unescape_codepoints(string)
|
50
|
+
::EBNF::Unescape.unescape_codepoints(string)
|
51
|
+
end
|
52
|
+
|
53
|
+
##
|
54
|
+
# Returns a copy of the given `input` string with all string escape
|
55
|
+
# sequences (e.g. `\n` and `\t`) replaced with their unescaped UTF-8
|
56
|
+
# character counterparts.
|
57
|
+
#
|
58
|
+
# @param [String] input
|
59
|
+
# @return [String]
|
60
|
+
# @see https://www.w3.org/TR/rdf-sparql-query/#grammarEscapes
|
61
|
+
def self.unescape_string(input)
|
62
|
+
::EBNF::Unescape.unescape_string(input)
|
63
|
+
end
|
64
|
+
|
41
65
|
##
|
42
66
|
# Tokenizes the given `input` string or stream.
|
43
67
|
#
|