antlr3 1.9.2 → 1.11.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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YmYwNTc3MWI2YTgyNzNkMTFlMjQ0YTExMTJlNWE0ZWE3MTAwMTRmMQ==
5
- data.tar.gz: !binary |-
6
- NjkyMzE4ZWFkNTM5ZGI5MGM0MjFiMmNhNTBkNDgzNWU5ZmVhODAwNQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NThiNmM1ZDUwM2ZjZDZhYTE1MzE1NzE0NjQzZjgyNmE1ZDgzMzJhZjYzZTNk
10
- N2NmOTVmNTExYWZiYjFmYTBlZDM1NjNkNWExNjA5ZWM4MGJiMTMwNWE2YzYx
11
- NDdmOWEzNjBmZjYzM2QwZTcwNDI0MTdhZmJjZDBlOGQwOWRmYjI=
12
- data.tar.gz: !binary |-
13
- ZDUxY2Q5ODZmMGNkNjllYzgyODI4ZmRjNzNmY2JmZGNkMGYzN2JiYTNkMGQ5
14
- MTliNzg2ZTUxMTk0NTg0YjFjZjkxZGQ4MmFjOWEyOGRjNDRlZGFmMzU2ZGJk
15
- ZmIzZGE3NjNjNWMzMjhlN2U1ZDM1OTRmOGExOTIxZWIwYzI4YWQ=
2
+ SHA256:
3
+ metadata.gz: ae8d45b49202792bd792ac756f716f6430c390f9b717fad64527deaba61477fc
4
+ data.tar.gz: 8672def10e55ab3e0f1a154ae5bf07d442ed4626625abd6b3c9e20d850f696bb
5
+ SHA512:
6
+ metadata.gz: 83ded24f66b66c3e509e44662be517d23cb23a76b55e84fa1097e60760fc569a01b5d6cda359eb0d93bd5b255b6337108fd4581e246d545519d779854d4dba75
7
+ data.tar.gz: 1b8a599ee872bd1b869fe47b562d831ea63223edee8afd0285099ce8cef8771e2108f1987a8decf710cf70337b9626c2a4934a3d5d8c279a49f1f2ab963ac428
data/Manifest.txt CHANGED
@@ -1,168 +1,168 @@
1
1
  bin/antlr4ruby
2
- lib/antlr3/dot.rb
3
- lib/antlr3/error.rb
4
- lib/antlr3/dfa.rb
5
- lib/antlr3/debug.rb
6
- lib/antlr3/main.rb
7
- lib/antlr3/tree/debug.rb
8
- lib/antlr3/tree/wizard.rb
9
- lib/antlr3/tree/visitor.rb
2
+ lib/antlr3/constants.rb
3
+ lib/antlr3/debug/event-hub.rb
10
4
  lib/antlr3/debug/record-event-listener.rb
11
5
  lib/antlr3/debug/rule-tracer.rb
12
- lib/antlr3/debug/event-hub.rb
13
6
  lib/antlr3/debug/socket.rb
14
7
  lib/antlr3/debug/trace-event-listener.rb
15
- lib/antlr3/version.rb
8
+ lib/antlr3/debug.rb
9
+ lib/antlr3/dfa.rb
10
+ lib/antlr3/dot.rb
11
+ lib/antlr3/error.rb
12
+ lib/antlr3/main.rb
13
+ lib/antlr3/modes/ast-builder.rb
14
+ lib/antlr3/modes/filter.rb
15
+ lib/antlr3/profile.rb
16
+ lib/antlr3/recognizers.rb
16
17
  lib/antlr3/streams/interactive.rb
17
- lib/antlr3/streams/unicode.rb
18
18
  lib/antlr3/streams/rewrite.rb
19
+ lib/antlr3/streams/unicode.rb
19
20
  lib/antlr3/streams.rb
20
- lib/antlr3/tree.rb
21
- lib/antlr3/profile.rb
22
21
  lib/antlr3/task.rb
23
- lib/antlr3/template.rb
24
- lib/antlr3/constants.rb
25
- lib/antlr3/token.rb
26
- lib/antlr3/modes/filter.rb
27
- lib/antlr3/modes/ast-builder.rb
28
- lib/antlr3/recognizers.rb
29
- lib/antlr3/template/group-file-parser.rb
30
- lib/antlr3/template/parameter.rb
31
22
  lib/antlr3/template/group-file-lexer.rb
23
+ lib/antlr3/template/group-file-parser.rb
32
24
  lib/antlr3/template/group-file.rb
33
- lib/antlr3/util.rb
34
- lib/antlr3/test/grammar.rb
35
- lib/antlr3/test/core-extensions.rb
25
+ lib/antlr3/template/parameter.rb
26
+ lib/antlr3/template.rb
36
27
  lib/antlr3/test/call-stack.rb
28
+ lib/antlr3/test/core-extensions.rb
37
29
  lib/antlr3/test/functional.rb
30
+ lib/antlr3/test/grammar.rb
31
+ lib/antlr3/token.rb
32
+ lib/antlr3/tree/debug.rb
33
+ lib/antlr3/tree/visitor.rb
34
+ lib/antlr3/tree/wizard.rb
35
+ lib/antlr3/tree.rb
36
+ lib/antlr3/util.rb
37
+ lib/antlr3/version.rb
38
38
  lib/antlr3.rb
39
+ test/unit/sample-input/file-stream-1
40
+ test/unit/sample-input/template-group
41
+ test/unit/sample-input/teststreams.input2
42
+ test/unit/test-dfa.rb
39
43
  test/unit/test-exceptions.rb
40
- test/unit/test-trees.rb
44
+ test/unit/test-recognizers.rb
45
+ test/unit/test-scheme.rb
41
46
  test/unit/test-scope.rb
42
- test/unit/test-tree-wizard.rb
43
47
  test/unit/test-streams.rb
44
- test/unit/test-recognizers.rb
45
48
  test/unit/test-template.rb
46
- test/unit/sample-input/file-stream-1
47
- test/unit/sample-input/teststreams.input2
48
- test/unit/sample-input/template-group
49
+ test/unit/test-tree-wizard.rb
50
+ test/unit/test-trees.rb
49
51
  test/unit/test-unicode-stream.rb
50
- test/unit/test-dfa.rb
51
- test/unit/test-scheme.rb
52
- test/functional/tree-parser/basic.rb
53
- test/functional/parser/actions.rb
54
- test/functional/parser/predicates.rb
55
- test/functional/parser/calc.rb
56
- test/functional/parser/basic.rb
57
- test/functional/parser/rule-methods.rb
58
- test/functional/parser/properties.rb
59
- test/functional/parser/scopes.rb
60
- test/functional/parser/nuances.rb
61
- test/functional/parser/backtracking.rb
62
- test/functional/parser/ll-star.rb
63
- test/functional/debugging/rule-tracing.rb
64
- test/functional/debugging/profile-mode.rb
65
- test/functional/debugging/debug-mode.rb
66
- test/functional/main/main-scripts.rb
67
- test/functional/lexer/filter-mode.rb
68
- test/functional/lexer/basic.rb
69
- test/functional/lexer/properties.rb
70
- test/functional/lexer/xml.rb
71
- test/functional/lexer/nuances.rb
72
- test/functional/lexer/syn-pred.rb
52
+ test/functional/ast-output/auto-ast.rb
73
53
  test/functional/ast-output/construction.rb
74
54
  test/functional/ast-output/hetero-nodes.rb
75
- test/functional/ast-output/tree-rewrite.rb
76
- test/functional/ast-output/auto-ast.rb
77
55
  test/functional/ast-output/rewrites.rb
56
+ test/functional/ast-output/tree-rewrite.rb
57
+ test/functional/debugging/debug-mode.rb
58
+ test/functional/debugging/profile-mode.rb
59
+ test/functional/debugging/rule-tracing.rb
78
60
  test/functional/delegation/import.rb
61
+ test/functional/lexer/basic.rb
62
+ test/functional/lexer/filter-mode.rb
63
+ test/functional/lexer/nuances.rb
64
+ test/functional/lexer/properties.rb
65
+ test/functional/lexer/syn-pred.rb
66
+ test/functional/lexer/xml.rb
67
+ test/functional/main/main-scripts.rb
68
+ test/functional/parser/actions.rb
69
+ test/functional/parser/backtracking.rb
70
+ test/functional/parser/basic.rb
71
+ test/functional/parser/calc.rb
72
+ test/functional/parser/ll-star.rb
73
+ test/functional/parser/nuances.rb
74
+ test/functional/parser/predicates.rb
75
+ test/functional/parser/properties.rb
76
+ test/functional/parser/rule-methods.rb
77
+ test/functional/parser/scopes.rb
78
+ test/functional/template-output/template-output.rb
79
79
  test/functional/token-rewrite/basic.rb
80
80
  test/functional/token-rewrite/via-parser.rb
81
- test/functional/template-output/template-output.rb
82
- templates/Support.stg
81
+ test/functional/tree-parser/basic.rb
82
+ templates/AST.stg
83
83
  templates/ASTDbg.stg
84
- templates/ASTTreeParser.stg
85
84
  templates/ASTParser.stg
86
- templates/AST.stg
87
- templates/ST.stg
85
+ templates/ASTTreeParser.stg
88
86
  templates/Dbg.stg
89
87
  templates/Ruby.stg
88
+ templates/ST.stg
89
+ templates/Support.stg
90
90
  samples/CPP.g
91
91
  samples/ANTLRv3Grammar.g
92
92
  samples/JavaScript.g
93
- samples/standard/java/Java.g
94
- samples/standard/java/output
95
- samples/standard/java/input
96
- samples/standard/java/java.rb
97
- samples/standard/xml/xml.rb
98
- samples/standard/xml/XML.g
99
- samples/standard/xml/output
100
- samples/standard/xml/input
101
- samples/standard/xml/README
102
- samples/standard/scopes/scopes.rb
103
- samples/standard/scopes/output
104
- samples/standard/scopes/input
105
- samples/standard/scopes/SymbolTable.g
106
- samples/standard/simplecTreeParser/SimpleCWalker.g
107
- samples/standard/simplecTreeParser/output
108
- samples/standard/simplecTreeParser/input
109
- samples/standard/simplecTreeParser/simplec.rb
110
- samples/standard/simplecTreeParser/SimpleC.g
111
- samples/standard/cminus/cminus.rb
112
- samples/standard/cminus/python.group
113
- samples/standard/cminus/output
114
- samples/standard/cminus/java.group
115
- samples/standard/cminus/input
116
- samples/standard/cminus/bytecode.group
117
- samples/standard/cminus/CMinus.g
118
- samples/standard/rakefile
93
+ samples/standard/C/C.g
94
+ samples/standard/C/C.tokens
95
+ samples/standard/C/C__testrig.st
96
+ samples/standard/C/c.rb
97
+ samples/standard/C/input
98
+ samples/standard/C/output
99
+ samples/standard/LL-star/LLStar.g
100
+ samples/standard/LL-star/input
101
+ samples/standard/LL-star/ll-star.rb
102
+ samples/standard/LL-star/output
119
103
  samples/standard/calc/Calculator.g
120
104
  samples/standard/calc/Calculator.py
121
105
  samples/standard/calc/Calculator.rb
106
+ samples/standard/cminus/CMinus.g
107
+ samples/standard/cminus/bytecode.group
108
+ samples/standard/cminus/cminus.rb
109
+ samples/standard/cminus/input
110
+ samples/standard/cminus/java.group
111
+ samples/standard/cminus/output
112
+ samples/standard/cminus/python.group
113
+ samples/standard/dynamic-scope/DynamicScopes.g
114
+ samples/standard/dynamic-scope/dynamic-scopes.rb
115
+ samples/standard/dynamic-scope/input
116
+ samples/standard/dynamic-scope/output
117
+ samples/standard/fuzzy/FuzzyJava.g
118
+ samples/standard/fuzzy/fuzzy.py
119
+ samples/standard/fuzzy/fuzzy.rb
120
+ samples/standard/fuzzy/input
121
+ samples/standard/fuzzy/output
122
+ samples/standard/hoisted-predicates/HoistedPredicates.g
123
+ samples/standard/hoisted-predicates/hoisted-predicates.rb
124
+ samples/standard/hoisted-predicates/input
125
+ samples/standard/hoisted-predicates/output
122
126
  samples/standard/island-grammar/Javadoc.g
123
- samples/standard/island-grammar/output
127
+ samples/standard/island-grammar/Simple.g
124
128
  samples/standard/island-grammar/input
125
129
  samples/standard/island-grammar/island.rb
126
- samples/standard/island-grammar/Simple.g
127
- samples/standard/python/output
128
- samples/standard/python/PythonTokenSource.rb
130
+ samples/standard/island-grammar/output
131
+ samples/standard/java/Java.g
132
+ samples/standard/java/input
133
+ samples/standard/java/java.rb
134
+ samples/standard/java/output
129
135
  samples/standard/python/Python.g
136
+ samples/standard/python/PythonTokenSource.rb
130
137
  samples/standard/python/input
138
+ samples/standard/python/output
131
139
  samples/standard/python/python.rb
132
- samples/standard/treeparser/treeparser.rb
133
- samples/standard/treeparser/LangDumpDecl.g
134
- samples/standard/treeparser/output
140
+ samples/standard/rakefile
141
+ samples/standard/scopes/SymbolTable.g
142
+ samples/standard/scopes/input
143
+ samples/standard/scopes/output
144
+ samples/standard/scopes/scopes.rb
145
+ samples/standard/simplecTreeParser/SimpleC.g
146
+ samples/standard/simplecTreeParser/SimpleCWalker.g
147
+ samples/standard/simplecTreeParser/input
148
+ samples/standard/simplecTreeParser/output
149
+ samples/standard/simplecTreeParser/simplec.rb
135
150
  samples/standard/treeparser/Lang.g
151
+ samples/standard/treeparser/LangDumpDecl.g
136
152
  samples/standard/treeparser/input
137
- samples/standard/fuzzy/fuzzy.py
138
- samples/standard/fuzzy/FuzzyJava.g
139
- samples/standard/fuzzy/output
140
- samples/standard/fuzzy/input
141
- samples/standard/fuzzy/fuzzy.rb
142
- samples/standard/tweak/tweak.rb
143
- samples/standard/tweak/output
153
+ samples/standard/treeparser/output
154
+ samples/standard/treeparser/treeparser.rb
144
155
  samples/standard/tweak/Tweak.g
145
156
  samples/standard/tweak/input
146
- samples/standard/C/c.rb
147
- samples/standard/C/C__testrig.st
148
- samples/standard/C/C.g
149
- samples/standard/C/output
150
- samples/standard/C/input
151
- samples/standard/C/C.tokens
152
- samples/standard/dynamic-scope/output
153
- samples/standard/dynamic-scope/DynamicScopes.g
154
- samples/standard/dynamic-scope/input
155
- samples/standard/dynamic-scope/dynamic-scopes.rb
156
- samples/standard/LL-star/output
157
- samples/standard/LL-star/input
158
- samples/standard/LL-star/ll-star.rb
159
- samples/standard/LL-star/LLStar.g
160
- samples/standard/hoisted-predicates/hoisted-predicates.rb
161
- samples/standard/hoisted-predicates/HoistedPredicates.g
162
- samples/standard/hoisted-predicates/output
163
- samples/standard/hoisted-predicates/input
164
- History.txt
157
+ samples/standard/tweak/output
158
+ samples/standard/tweak/tweak.rb
159
+ samples/standard/xml/README
160
+ samples/standard/xml/XML.g
161
+ samples/standard/xml/input
162
+ samples/standard/xml/output
163
+ samples/standard/xml/xml.rb
165
164
  ANTLR-LICENSE.txt
165
+ History.txt
166
166
  DEVELOPER-README.rdoc
167
167
  README.rdoc
168
168
  java/antlr-full-3.5.jar
Binary file
data/lib/antlr3/dfa.rb CHANGED
@@ -166,7 +166,7 @@ class DFA
166
166
  END
167
167
  end
168
168
 
169
- if RUBY_VERSION =~ /^1\.9/
169
+ if RUBY_VERSION >= "1.9"
170
170
 
171
171
  def predict( input )
172
172
  mark = input.mark
@@ -12,7 +12,7 @@ uses Readline (if available) or standard IO#gets to fetch data on demand.
12
12
 
13
13
  class InteractiveStringStream < StringStream
14
14
 
15
- if RUBY_VERSION =~ /^1\.9/
15
+ if RUBY_VERSION >= "1.9"
16
16
 
17
17
  # creates a new StringStream object where +data+ is the string data to stream.
18
18
  # accepts the following options in a symbol-to-value hash:
@@ -385,7 +385,7 @@ class StringStream
385
385
  attr_reader :data
386
386
  attr_reader :string
387
387
 
388
- if RUBY_VERSION =~ /^1\.9/
388
+ if RUBY_VERSION >= "1.9"
389
389
 
390
390
  # creates a new StringStream object where +data+ is the string data to stream.
391
391
  # accepts the following options in a symbol-to-value hash:
@@ -4,13 +4,7 @@
4
4
  require 'antlr3'
5
5
  require 'antlr3/test/core-extensions'
6
6
  require 'antlr3/test/call-stack'
7
-
8
- if RUBY_VERSION =~ /^1\.9/
9
- require 'digest/md5'
10
- MD5 = Digest::MD5
11
- else
12
- require 'md5'
13
- end
7
+ require 'digest/md5'
14
8
 
15
9
  module ANTLR3
16
10
  module Test
@@ -305,7 +299,7 @@ private
305
299
  def write_to_disk
306
300
  @path ||= output_directory / @name + '.g'
307
301
  test( ?d, output_directory ) or Dir.mkdir( output_directory )
308
- unless test( ?f, @path ) and MD5.digest( @source ) == MD5.digest( File.read( @path ) )
302
+ unless test( ?f, @path ) and Digest::MD5.digest( @source ) == Digest::MD5.digest( File.read( @path ) )
309
303
  open( @path, 'w' ) { |f| f.write( @source ) }
310
304
  end
311
305
  end
data/lib/antlr3/tree.rb CHANGED
@@ -980,7 +980,7 @@ class CommonTreeNodeStream
980
980
  include TreeNodeStream
981
981
 
982
982
  attr_accessor :token_stream
983
- attr_reader :adaptor, :position
983
+ attr_reader :adaptor, :position, :last_marker
984
984
 
985
985
  def initialize( *args )
986
986
  options = args.last.is_a?( ::Hash ) ? args.pop : {}
@@ -19,8 +19,8 @@ module ANTLR3
19
19
  # The version data for the current state the library itself
20
20
  #
21
21
  MAJOR_VERSION = 1
22
- MINOR_VERSION = 9
23
- PATCH_VERSION = 2
22
+ MINOR_VERSION = 11
23
+ PATCH_VERSION = 0
24
24
  VERSION = [ MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION ]
25
25
  VERSION_STRING = VERSION.join( '.' ).freeze
26
26
 
data/lib/antlr3.rb CHANGED
@@ -156,7 +156,7 @@ module ANTLR3
156
156
  )
157
157
  end
158
158
 
159
- File.exists?( path ) ? path : nil
159
+ File.exist?( path ) ? path : nil
160
160
  end
161
161
 
162
162
  ##############################################################################################
data/rakefile CHANGED
@@ -15,46 +15,46 @@ Hoe.spec "antlr3" do
15
15
  )
16
16
 
17
17
  self.test_globs = [
18
+ "test/unit/test-dfa.rb",
18
19
  "test/unit/test-exceptions.rb",
19
- "test/unit/test-trees.rb",
20
+ "test/unit/test-recognizers.rb",
21
+ "test/unit/test-scheme.rb",
20
22
  "test/unit/test-scope.rb",
21
- "test/unit/test-tree-wizard.rb",
22
23
  "test/unit/test-streams.rb",
23
- "test/unit/test-recognizers.rb",
24
24
  "test/unit/test-template.rb",
25
+ "test/unit/test-tree-wizard.rb",
26
+ "test/unit/test-trees.rb",
25
27
  "test/unit/test-unicode-stream.rb",
26
- "test/unit/test-dfa.rb",
27
- "test/unit/test-scheme.rb",
28
- "test/functional/tree-parser/basic.rb",
29
- "test/functional/parser/actions.rb",
30
- "test/functional/parser/predicates.rb",
31
- "test/functional/parser/calc.rb",
32
- "test/functional/parser/basic.rb",
33
- "test/functional/parser/rule-methods.rb",
34
- "test/functional/parser/properties.rb",
35
- "test/functional/parser/scopes.rb",
36
- "test/functional/parser/nuances.rb",
37
- "test/functional/parser/backtracking.rb",
38
- "test/functional/parser/ll-star.rb",
39
- "test/functional/debugging/rule-tracing.rb",
40
- "test/functional/debugging/profile-mode.rb",
41
- "test/functional/debugging/debug-mode.rb",
42
- "test/functional/main/main-scripts.rb",
43
- "test/functional/lexer/filter-mode.rb",
44
- "test/functional/lexer/basic.rb",
45
- "test/functional/lexer/properties.rb",
46
- "test/functional/lexer/xml.rb",
47
- "test/functional/lexer/nuances.rb",
48
- "test/functional/lexer/syn-pred.rb",
28
+ "test/functional/ast-output/auto-ast.rb",
49
29
  "test/functional/ast-output/construction.rb",
50
30
  "test/functional/ast-output/hetero-nodes.rb",
51
- "test/functional/ast-output/tree-rewrite.rb",
52
- "test/functional/ast-output/auto-ast.rb",
53
31
  "test/functional/ast-output/rewrites.rb",
32
+ "test/functional/ast-output/tree-rewrite.rb",
33
+ "test/functional/debugging/debug-mode.rb",
34
+ "test/functional/debugging/profile-mode.rb",
35
+ "test/functional/debugging/rule-tracing.rb",
54
36
  "test/functional/delegation/import.rb",
37
+ "test/functional/lexer/basic.rb",
38
+ "test/functional/lexer/filter-mode.rb",
39
+ "test/functional/lexer/nuances.rb",
40
+ "test/functional/lexer/properties.rb",
41
+ "test/functional/lexer/syn-pred.rb",
42
+ "test/functional/lexer/xml.rb",
43
+ "test/functional/main/main-scripts.rb",
44
+ "test/functional/parser/actions.rb",
45
+ "test/functional/parser/backtracking.rb",
46
+ "test/functional/parser/basic.rb",
47
+ "test/functional/parser/calc.rb",
48
+ "test/functional/parser/ll-star.rb",
49
+ "test/functional/parser/nuances.rb",
50
+ "test/functional/parser/predicates.rb",
51
+ "test/functional/parser/properties.rb",
52
+ "test/functional/parser/rule-methods.rb",
53
+ "test/functional/parser/scopes.rb",
54
+ "test/functional/template-output/template-output.rb",
55
55
  "test/functional/token-rewrite/basic.rb",
56
56
  "test/functional/token-rewrite/via-parser.rb",
57
- "test/functional/template-output/template-output.rb"
57
+ "test/functional/tree-parser/basic.rb"
58
58
  ]
59
59
 
60
60
  end