ebnf 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/ebnf/ll1/lexer.rb +24 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08b2411d5c4d34425d00259126e0d6f55c086b2c60c74e8d3ddc6a099a60ec5e'
4
- data.tar.gz: d8185780e437d3db9c2644d62f51d497b25be130d20b79d63e3101e222180408
3
+ metadata.gz: 675c1d0315518a2a8159fb1cdfb3bd0054e2a4eac1a12adae63dbbe02cf2d611
4
+ data.tar.gz: '0229b65832d59f84c39bfc9770555fb50a3500f5d551ea400bd3ae57df1b408b'
5
5
  SHA512:
6
- metadata.gz: b972788258b8261d6e59a093268f31be74d3db13535b0db63199aae9ed36b93602d6b8034439152ce62361797eb3990b747d33a55551baa01bd2d1a9aed6bf6f
7
- data.tar.gz: cc3b0bb1ecd8c0f0e7135989e96bb826d35f1406ecc3482e88a00f77aaf1df0c8ab5c6f98cb11b37c2c83f77b2d9d762f227d20a0bec44a27cbe48616c31f4a4
6
+ metadata.gz: 0e13f53ed30fad026c5fd901a449805089e948838e6aae38b4e3fe87d274f07e19ae9c197a93cba0dc90a57cea4f8b341f13904265ac47a91631a5cc7801e6ec
7
+ data.tar.gz: 9bb40f43a8a9ff95bbd9d097729db694033217ba1226a403844e9bf5b20ee852b57f8fef54dd200d3ee98847da7a21efcaa675a34fb607c799a901f4798f3085
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.2.1
@@ -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
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebnf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg