rparsec2 1.1.0 → 1.2.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.
data/lib/rparsec/token.rb CHANGED
@@ -1,43 +1,45 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rparsec/misc'
2
4
 
3
5
  module RParsec
4
6
 
5
- #
6
- # Represents a token during lexical analysis.
7
- #
8
- class Token
9
- extend DefHelper
10
-
11
- def_ctor :kind, :text, :index
12
-
13
7
  #
14
- # The type of the token
8
+ # Represents a token during lexical analysis.
15
9
  #
16
- attr_reader :kind
10
+ class Token
11
+ extend DefHelper
17
12
 
18
- #
19
- # The text of the matched range
20
- #
21
- attr_reader :text
13
+ def_ctor :kind, :text, :index
22
14
 
23
- #
24
- # The starting index of the matched range
25
- #
26
- attr_reader :index
15
+ #
16
+ # The type of the token
17
+ #
18
+ attr_reader :kind
27
19
 
28
- #
29
- # The length of the token.
30
- #
31
- def length
32
- @text.length
33
- end
20
+ #
21
+ # The text of the matched range
22
+ #
23
+ attr_reader :text
34
24
 
35
- #
36
- # String representation of the token.
37
- #
38
- def to_s
39
- "#{@kind}: #{@text}"
25
+ #
26
+ # The starting index of the matched range
27
+ #
28
+ attr_reader :index
29
+
30
+ #
31
+ # The length of the token.
32
+ #
33
+ def length
34
+ @text.length
35
+ end
36
+
37
+ #
38
+ # String representation of the token.
39
+ #
40
+ def to_s
41
+ "#{@kind}: #{@text}"
42
+ end
40
43
  end
41
- end
42
44
 
43
45
  end # module
data/lib/rparsec.rb CHANGED
@@ -1,7 +1,10 @@
1
- %w{
2
- parsers operators keywords expressions
3
- }.each {|lib| require "rparsec/#{lib}"}
1
+ # frozen_string_literal: true
2
+
3
+ require "rparsec/parsers"
4
+ require "rparsec/operators"
5
+ require "rparsec/keywords"
6
+ require "rparsec/expressions"
4
7
 
5
8
  module RParsec
6
- VERSION = "1.1.0"
9
+ VERSION = "1.2.1"
7
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rparsec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Yu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-03 00:00:00.000000000 Z
11
+ date: 2024-11-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: rparsec is a recursive descent parser combinator framework. Declarative
14
14
  API allows creating parser intuitively and dynamically.
@@ -21,22 +21,30 @@ files:
21
21
  - lib/rparsec/context.rb
22
22
  - lib/rparsec/error.rb
23
23
  - lib/rparsec/expressions.rb
24
+ - lib/rparsec/functor_mixin.rb
24
25
  - lib/rparsec/functors.rb
25
26
  - lib/rparsec/id_monad.rb
26
27
  - lib/rparsec/keywords.rb
27
28
  - lib/rparsec/locator.rb
28
29
  - lib/rparsec/misc.rb
29
30
  - lib/rparsec/monad.rb
31
+ - lib/rparsec/operator_table.rb
30
32
  - lib/rparsec/operators.rb
31
33
  - lib/rparsec/parser.rb
32
34
  - lib/rparsec/parser_monad.rb
33
35
  - lib/rparsec/parsers.rb
34
36
  - lib/rparsec/token.rb
35
- homepage:
37
+ homepage: https://git.disroot.org/gemmaro/rparsec2
36
38
  licenses:
37
39
  - BSD-3-Clause
38
40
  metadata:
39
41
  rubygems_mfa_required: 'true'
42
+ bug_tracker_uri: https://git.disroot.org/gemmaro/rparsec2/issues
43
+ changelog_uri: https://git.disroot.org/gemmaro/rparsec2/src/branch/main/CHANGELOG.md
44
+ documentation_uri: https://gemmaro.github.io/rparsec2
45
+ homepage_uri: https://git.disroot.org/gemmaro/rparsec2
46
+ source_code_uri: https://git.disroot.org/gemmaro/rparsec2
47
+ wiki_uri: https://git.disroot.org/gemmaro/rparsec2/wiki
40
48
  post_install_message:
41
49
  rdoc_options: []
42
50
  require_paths: