antlr3 1.10.0 → 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,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 315085c0b68e03592c98d6792ad5470fe3b543a5
4
- data.tar.gz: 16281baa841357dbb4c84e20d21adb1f5220d4bd
2
+ SHA256:
3
+ metadata.gz: ae8d45b49202792bd792ac756f716f6430c390f9b717fad64527deaba61477fc
4
+ data.tar.gz: 8672def10e55ab3e0f1a154ae5bf07d442ed4626625abd6b3c9e20d850f696bb
5
5
  SHA512:
6
- metadata.gz: d51655540bd5bd7361381db7a2f05d5b9d2a4bd1744021f3eb171e33273eedf8c0372746ee0f91acc6bfbe130a9f0698ceed4ae62f66ff47d4dbe185a2a7ad00
7
- data.tar.gz: 91eaa9d58bceddf769476fd28dd8f924d97078f8d4de4e846faafb05c77db8548cc19223fc10bdfafc1fe95cffad8794662d612ccfe3718350f6f1902a21a1e4
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
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|2\.)/
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|2\.)/
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|2\.)/
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|2\.)/
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
@@ -19,7 +19,7 @@ module ANTLR3
19
19
  # The version data for the current state the library itself
20
20
  #
21
21
  MAJOR_VERSION = 1
22
- MINOR_VERSION = 10
22
+ MINOR_VERSION = 11
23
23
  PATCH_VERSION = 0
24
24
  VERSION = [ MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION ]
25
25
  VERSION_STRING = VERSION.join( '.' ).freeze
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
data/samples/JavaScript.g CHANGED
@@ -49,47 +49,47 @@ tokens {
49
49
  scope InFor { active; }
50
50
 
51
51
  @parser::members {
52
-
52
+
53
53
  def auto_semicolon?( error )
54
54
  if NoViableAlternative === error
55
55
  return( @auto_semicolon = error ) unless same_line?
56
56
  end
57
57
  return false
58
58
  end
59
-
59
+
60
60
  def recover( error = $! )
61
61
  @auto_semicolon == error and return( @auto_semicolon = nil )
62
62
  super
63
63
  end
64
-
64
+
65
65
  def report_error( error = $! )
66
66
  auto_semicolon?( error ) and return
67
67
  super
68
68
  end
69
-
69
+
70
70
  def newline?( from = 1 )
71
71
  to = from == -1 ? 1 : from + 1
72
72
  start = @input.future?( from )
73
73
  stop = @input.future?( to )
74
-
74
+
75
75
  start.upto( stop ) do | i |
76
76
  @input.at( i ).type == NEWLINE and return( true )
77
77
  end
78
-
78
+
79
79
  return( false )
80
80
  end
81
-
81
+
82
82
  def same_line?
83
83
  stop = @input.future? || @input.length
84
84
  start = @input.past? || 0
85
-
85
+
86
86
  start.upto( stop ) do | i |
87
87
  @input.at( i ).type == NEWLINE and return( false )
88
88
  end
89
-
89
+
90
90
  return( true )
91
91
  end
92
-
92
+
93
93
  def prepend_tree( root, child )
94
94
  child = @adaptor.rule_post_processing( child )
95
95
  root.unshift( child )
@@ -101,14 +101,13 @@ scope InFor { active; }
101
101
 
102
102
  @lexer::members {
103
103
  attr_accessor :value_expected
104
-
104
+
105
105
  NO_VALUE_FOLLOWS = Set[
106
106
  ID, REGEX, STRING, NUMBER, THIS,
107
107
  TRUE, FALSE, NULL, UNDEFINED,
108
- RPAREN, RBRACK, RBRACE,
109
- IVAR, DOC, YAML, WORDS
108
+ RPAREN, RBRACK, RBRACE
110
109
  ]
111
-
110
+
112
111
  def next_token
113
112
  token = super
114
113
  unless token.hidden?
@@ -134,7 +133,7 @@ program
134
133
  : source_elements -> source_elements
135
134
  | -> ^( UNDEFINED )
136
135
  ;
137
-
136
+
138
137
  source_elements
139
138
  : statement ( statement )*
140
139
  ;
@@ -147,7 +146,7 @@ block
147
146
  statement_block
148
147
  : '{' statement_list? '}' -> ^( BLOCK statement_list? )
149
148
  ;
150
-
149
+
151
150
  statement_list
152
151
  : statement+ -> statement+
153
152
  ;
@@ -182,9 +181,9 @@ statement
182
181
  | try_statement
183
182
  ;
184
183
 
185
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
184
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
186
185
  // Simple Statements
187
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
186
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
188
187
 
189
188
  empty_statement
190
189
  : ';' ->
@@ -208,9 +207,9 @@ blank
208
207
  : -> ^( UNDEFINED )
209
208
  ;
210
209
 
211
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
210
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
212
211
  // Block-ish Statements
213
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
212
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
214
213
 
215
214
  try_statement
216
215
  : 'try'
@@ -235,9 +234,9 @@ with_statement
235
234
  : 'with' clause block -> ^( 'with' clause block )
236
235
  ;
237
236
 
238
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
237
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
239
238
  // Variable Declarations
240
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
239
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
241
240
 
242
241
  variable_statement
243
242
  : 'var'^ variable_declaration_list statement_end!
@@ -264,39 +263,39 @@ declaration_target
264
263
  | '{' declaration_key ( ',' declaration_key )* '}' -> ^( OBJECT declaration_key+ )
265
264
  | variable_name -> variable_name
266
265
  ;
267
-
266
+
268
267
  declaration_key
269
268
  : property_name ':'^ declaration_target
270
269
  ;
271
270
 
272
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
271
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
273
272
  // Branching Statements
274
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
273
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
275
274
 
276
275
  if_statement
277
276
  : 'if'^ clause block ( 'else'! block )?
278
277
  ;
279
278
 
280
279
  switch_statement
281
- : 'switch' '(' expression_list ')'
280
+ : 'switch' '(' expression_list ')'
282
281
  '{'
283
282
  ( case_clause )*
284
- ( default_clause ( case_clause )* )?
283
+ ( default_clause ( case_clause )* )?
285
284
  '}'
286
285
  -> ^( 'switch' expression_list case_clause* default_clause? )
287
286
  ;
288
-
287
+
289
288
  case_clause
290
289
  : 'case'^ expression_list ':'! statement_list?
291
290
  ;
292
-
291
+
293
292
  default_clause
294
293
  : 'default'^ ':'! statement_list?
295
294
  ;
296
295
 
297
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
296
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
298
297
  // While Loops
299
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
298
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
300
299
 
301
300
  do_while_statement
302
301
  : 'do' block 'while' clause statement_end
@@ -307,9 +306,9 @@ while_statement
307
306
  : 'while'^ clause block
308
307
  ;
309
308
 
310
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
309
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
311
310
  // For Loops
312
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
311
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
313
312
 
314
313
  for_loop
315
314
  : { @input.peek( 2 ) == EACH }?=> for_each_in_statement
@@ -326,7 +325,7 @@ for_statement
326
325
  ')'!
327
326
  block
328
327
  ;
329
-
328
+
330
329
  for_statement_initialiser_part
331
330
  scope InFor;
332
331
  @before { $InFor::active = true }
@@ -339,12 +338,12 @@ for_each_in_statement
339
338
  : 'for' 'each' '(' for_in_statement_initialiser_part 'in' expression ')' block
340
339
  -> ^( 'each' for_in_statement_initialiser_part expression block )
341
340
  ;
342
-
341
+
343
342
  for_in_statement
344
343
  : f='for' '(' for_in_statement_initialiser_part 'in' expression ')' block
345
344
  -> ^( FOR_IN[ $f ] for_in_statement_initialiser_part expression block )
346
345
  ;
347
-
346
+
348
347
  for_in_statement_initialiser_part
349
348
  scope InFor;
350
349
  @before { $InFor::active = true }
@@ -353,9 +352,9 @@ for_in_statement_initialiser_part
353
352
  | member
354
353
  ;
355
354
 
356
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
355
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
357
356
  // Flow Control
358
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
357
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
359
358
 
360
359
  continue_statement
361
360
  : 'continue'^ ( { same_line? }?=> ID )? statement_end!
@@ -372,7 +371,7 @@ return_statement
372
371
  yield_statement
373
372
  : 'yield'^ ( { same_line? }?=> expression_list )? statement_end!
374
373
  ;
375
-
374
+
376
375
  throw_statement
377
376
  : 'throw'^ ( { same_line? }?=> expression_list )? statement_end!
378
377
  ;
@@ -430,9 +429,9 @@ bit_and
430
429
  ;
431
430
 
432
431
  equality
433
- : relation
434
- (
435
- ( '=='^ | '!='^ | '==='^ | '!=='^ )
432
+ : relation
433
+ (
434
+ ( '=='^ | '!='^ | '==='^ | '!=='^ )
436
435
  relation
437
436
  )*
438
437
  ;
@@ -440,7 +439,7 @@ equality
440
439
  relation
441
440
  : shift ( relation_op^ shift )*
442
441
  ;
443
-
442
+
444
443
  relation_op
445
444
  : '<'
446
445
  | '>'
@@ -485,9 +484,9 @@ postfix
485
484
  )
486
485
  ;
487
486
 
488
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
487
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
489
488
  // Atomic Expressions
490
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
489
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
491
490
 
492
491
  member
493
492
  : ( receiver -> receiver )
@@ -495,7 +494,7 @@ member
495
494
  | arguments -> ^( CALL $member arguments )
496
495
  )*
497
496
  ;
498
-
497
+
499
498
  accessor
500
499
  : '[' expression ']' -> ^( AREF[ '[' ] expression ) //]
501
500
  | '.' property_name -> ^( '.' property_name )
@@ -517,14 +516,14 @@ arguments
517
516
  : '(' ( expression ( ',' expression )* )? ')' -> ^( ARGUMENTS expression* )
518
517
  ;
519
518
 
520
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
519
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
521
520
  // Functions / Blocks
522
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
521
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
523
522
 
524
523
  function
525
524
  : 'function'^ variable_name? function_parameters statement_block
526
525
  ;
527
-
526
+
528
527
  function_parameters
529
528
  : '(' parameters? ')' -> ^( PARAMS parameters? )
530
529
  ;
@@ -533,9 +532,9 @@ parameters
533
532
  : variable_name ( ',' variable_name )* -> variable_name+
534
533
  ;
535
534
 
536
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
535
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
537
536
  // Literals
538
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
537
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
539
538
 
540
539
  primary
541
540
  : 'this'^
@@ -556,12 +555,12 @@ array_literal
556
555
  : '[' ']' -> ^( ARRAY )
557
556
  | '[' list_item ( ',' list_item )* ']' -> ^( ARRAY list_item* )
558
557
  ;
559
-
558
+
560
559
  list_item
561
560
  : ( ',' )=> -> ^( UNDEFINED )
562
561
  | expression -> expression
563
562
  ;
564
-
563
+
565
564
  object_literal
566
565
  : '{' '}' -> ^( OBJECT )
567
566
  | '{' property_definition ( ',' property_definition )* '}'
@@ -574,9 +573,9 @@ property_definition
574
573
  | property_name ':'^ expression
575
574
  ;
576
575
 
577
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
576
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
578
577
  // Names and Words
579
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
578
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
580
579
 
581
580
  property_name
582
581
  : ID
@@ -598,10 +597,10 @@ pseudokeyword
598
597
 
599
598
  reserved
600
599
  : 'break' | 'do' | 'function' | 'new' | 'throw' | 'until'
601
- | 'case' | 'each' | 'get' | 'null' | 'true' | 'var'
602
- | 'catch' | 'else' | 'if' | 'return' | 'try' | 'void'
600
+ | 'case' | 'each' | 'get' | 'null' | 'true' | 'var'
601
+ | 'catch' | 'else' | 'if' | 'return' | 'try' | 'void'
603
602
  | 'continue' | 'false' | 'in' | 'set' | 'typeof' | 'while'
604
- | 'default' | 'finally' | 'instanceof' | 'switch' | 'undefined' | 'with'
603
+ | 'default' | 'finally' | 'instanceof' | 'switch' | 'undefined' | 'with'
605
604
  | 'delete' | 'for' | 'let' | 'this' | 'unless' | 'yield'
606
605
  ;
607
606
 
@@ -639,5 +638,3 @@ ID
639
638
  WS // Tab, vertical tab, form feed, space, non-breaking space and any other unicode "space separator".
640
639
  : ( '\t' | '\f' | ' ' | '\u00A0' )+ { $channel = HIDDEN }
641
640
  ;
642
-
643
-
@@ -71,6 +71,7 @@ class TestMainUtility < ANTLR3::Test::Functional
71
71
  END
72
72
 
73
73
  LexerMainFromStdIO::Lexer.main( [], :input => input, :output => output )
74
+
74
75
  lines = output.string.split( /\n/ )
75
76
  lines.should have( 3 ).things
76
77
  end
@@ -87,12 +88,13 @@ class TestMainUtility < ANTLR3::Test::Functional
87
88
 
88
89
  output = StringIO.new
89
90
  input = StringIO.new( 'yada yada' )
90
-
91
- MainForCombined::Parser.main(
91
+
92
+ MainForCombined::Parser.main(
92
93
  %w(--rule r --lexer-name MainForCombined::Lexer),
93
94
  :input => input, :output => output )
94
- lines = output.string.split( "\n" )
95
- lines.should have( 4 ).things
95
+
96
+ text_out = output.string
97
+ text_out.should include(%q[res="yada yada"])
96
98
  end
97
99
 
98
100
  example 'using built-in main to inspect AST constructed by an AST-building parser' do
@@ -123,7 +123,7 @@ class TestRuleVisibility < ANTLR3::Test::Functional
123
123
  END
124
124
 
125
125
  example 'using visibility modifiers on rules' do
126
- mname = RUBY_VERSION =~ /^(1\.9|2\.)/ ? proc { | n | n.to_sym } : proc { | n | n.to_s }
126
+ mname = RUBY_VERSION >= "1.9" ? proc { | n | n.to_sym } : proc { | n | n.to_s }
127
127
 
128
128
  RuleVisibility::Parser.public_instance_methods.should include( mname[ 'a' ] )
129
129
  RuleVisibility::Parser.protected_instance_methods.should include( mname[ 'c' ] )
@@ -31,7 +31,7 @@ class TestStringStream < Test::Unit::TestCase
31
31
  @stream.index.should == 2
32
32
  @stream.column.should == 2
33
33
  @stream.line.should == 1
34
-
34
+
35
35
  @stream.consume # \n
36
36
  @stream.index.should == 3
37
37
  @stream.column.should == 0
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: antlr3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Yetter
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2013-09-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: "Full power of Java's ANTLR 3 language recognition tool brought to Ruby.\nGenerate
14
13
  lexers, parsers, tree parsers, source translators, and language analysis\ntools
@@ -19,240 +18,237 @@ executables:
19
18
  extensions: []
20
19
  extra_rdoc_files: []
21
20
  files:
21
+ - ANTLR-LICENSE.txt
22
+ - DEVELOPER-README.rdoc
23
+ - History.txt
24
+ - Manifest.txt
25
+ - README.rdoc
22
26
  - bin/antlr4ruby
23
- - lib/antlr3/dot.rb
24
- - lib/antlr3/error.rb
25
- - lib/antlr3/dfa.rb
27
+ - java/RubyTarget.java
28
+ - java/antlr-full-3.5.jar
29
+ - lib/antlr3.rb
30
+ - lib/antlr3/constants.rb
26
31
  - lib/antlr3/debug.rb
27
- - lib/antlr3/main.rb
28
- - lib/antlr3/tree/debug.rb
29
- - lib/antlr3/tree/wizard.rb
30
- - lib/antlr3/tree/visitor.rb
32
+ - lib/antlr3/debug/event-hub.rb
31
33
  - lib/antlr3/debug/record-event-listener.rb
32
34
  - lib/antlr3/debug/rule-tracer.rb
33
- - lib/antlr3/debug/event-hub.rb
34
35
  - lib/antlr3/debug/socket.rb
35
36
  - lib/antlr3/debug/trace-event-listener.rb
36
- - lib/antlr3/version.rb
37
+ - lib/antlr3/dfa.rb
38
+ - lib/antlr3/dot.rb
39
+ - lib/antlr3/error.rb
40
+ - lib/antlr3/main.rb
41
+ - lib/antlr3/modes/ast-builder.rb
42
+ - lib/antlr3/modes/filter.rb
43
+ - lib/antlr3/profile.rb
44
+ - lib/antlr3/recognizers.rb
45
+ - lib/antlr3/streams.rb
37
46
  - lib/antlr3/streams/interactive.rb
38
- - lib/antlr3/streams/unicode.rb
39
47
  - lib/antlr3/streams/rewrite.rb
40
- - lib/antlr3/streams.rb
41
- - lib/antlr3/tree.rb
42
- - lib/antlr3/profile.rb
48
+ - lib/antlr3/streams/unicode.rb
43
49
  - lib/antlr3/task.rb
44
50
  - lib/antlr3/template.rb
45
- - lib/antlr3/constants.rb
46
- - lib/antlr3/token.rb
47
- - lib/antlr3/modes/filter.rb
48
- - lib/antlr3/modes/ast-builder.rb
49
- - lib/antlr3/recognizers.rb
50
- - lib/antlr3/template/group-file-parser.rb
51
- - lib/antlr3/template/parameter.rb
52
51
  - lib/antlr3/template/group-file-lexer.rb
52
+ - lib/antlr3/template/group-file-parser.rb
53
53
  - lib/antlr3/template/group-file.rb
54
- - lib/antlr3/util.rb
55
- - lib/antlr3/test/grammar.rb
56
- - lib/antlr3/test/core-extensions.rb
54
+ - lib/antlr3/template/parameter.rb
57
55
  - lib/antlr3/test/call-stack.rb
56
+ - lib/antlr3/test/core-extensions.rb
58
57
  - lib/antlr3/test/functional.rb
59
- - lib/antlr3.rb
60
- - test/unit/test-exceptions.rb
61
- - test/unit/test-trees.rb
62
- - test/unit/test-scope.rb
63
- - test/unit/test-tree-wizard.rb
64
- - test/unit/test-streams.rb
65
- - test/unit/test-recognizers.rb
66
- - test/unit/test-template.rb
67
- - test/unit/sample-input/file-stream-1
68
- - test/unit/sample-input/teststreams.input2
69
- - test/unit/sample-input/template-group
70
- - test/unit/test-unicode-stream.rb
71
- - test/unit/test-dfa.rb
72
- - test/unit/test-scheme.rb
73
- - test/functional/tree-parser/basic.rb
74
- - test/functional/parser/actions.rb
75
- - test/functional/parser/predicates.rb
76
- - test/functional/parser/calc.rb
77
- - test/functional/parser/basic.rb
78
- - test/functional/parser/rule-methods.rb
79
- - test/functional/parser/properties.rb
80
- - test/functional/parser/scopes.rb
81
- - test/functional/parser/nuances.rb
82
- - test/functional/parser/backtracking.rb
83
- - test/functional/parser/ll-star.rb
84
- - test/functional/debugging/rule-tracing.rb
85
- - test/functional/debugging/profile-mode.rb
86
- - test/functional/debugging/debug-mode.rb
87
- - test/functional/main/main-scripts.rb
88
- - test/functional/lexer/filter-mode.rb
89
- - test/functional/lexer/basic.rb
90
- - test/functional/lexer/properties.rb
91
- - test/functional/lexer/xml.rb
92
- - test/functional/lexer/nuances.rb
93
- - test/functional/lexer/syn-pred.rb
94
- - test/functional/ast-output/construction.rb
95
- - test/functional/ast-output/hetero-nodes.rb
96
- - test/functional/ast-output/tree-rewrite.rb
97
- - test/functional/ast-output/auto-ast.rb
98
- - test/functional/ast-output/rewrites.rb
99
- - test/functional/delegation/import.rb
100
- - test/functional/token-rewrite/basic.rb
101
- - test/functional/token-rewrite/via-parser.rb
102
- - test/functional/template-output/template-output.rb
103
- - templates/Support.stg
104
- - templates/ASTDbg.stg
105
- - templates/ASTTreeParser.stg
106
- - templates/ASTParser.stg
107
- - templates/AST.stg
108
- - templates/ST.stg
109
- - templates/Dbg.stg
110
- - templates/Ruby.stg
111
- - samples/CPP.g
58
+ - lib/antlr3/test/grammar.rb
59
+ - lib/antlr3/token.rb
60
+ - lib/antlr3/tree.rb
61
+ - lib/antlr3/tree/debug.rb
62
+ - lib/antlr3/tree/visitor.rb
63
+ - lib/antlr3/tree/wizard.rb
64
+ - lib/antlr3/util.rb
65
+ - lib/antlr3/version.rb
66
+ - rakefile
112
67
  - samples/ANTLRv3Grammar.g
68
+ - samples/CPP.g
113
69
  - samples/JavaScript.g
114
- - samples/standard/java/Java.g
115
- - samples/standard/java/output
116
- - samples/standard/java/input
117
- - samples/standard/java/java.rb
118
- - samples/standard/xml/xml.rb
119
- - samples/standard/xml/XML.g
120
- - samples/standard/xml/output
121
- - samples/standard/xml/input
122
- - samples/standard/xml/README
123
- - samples/standard/scopes/scopes.rb
124
- - samples/standard/scopes/output
125
- - samples/standard/scopes/input
126
- - samples/standard/scopes/SymbolTable.g
127
- - samples/standard/simplecTreeParser/SimpleCWalker.g
128
- - samples/standard/simplecTreeParser/output
129
- - samples/standard/simplecTreeParser/input
130
- - samples/standard/simplecTreeParser/simplec.rb
131
- - samples/standard/simplecTreeParser/SimpleC.g
132
- - samples/standard/cminus/cminus.rb
133
- - samples/standard/cminus/python.group
134
- - samples/standard/cminus/output
135
- - samples/standard/cminus/java.group
136
- - samples/standard/cminus/input
137
- - samples/standard/cminus/bytecode.group
138
- - samples/standard/cminus/CMinus.g
139
- - samples/standard/rakefile
70
+ - samples/standard/C/C.g
71
+ - samples/standard/C/C.tokens
72
+ - samples/standard/C/C__testrig.st
73
+ - samples/standard/C/c.rb
74
+ - samples/standard/C/input
75
+ - samples/standard/C/output
76
+ - samples/standard/LL-star/LLStar.g
77
+ - samples/standard/LL-star/input
78
+ - samples/standard/LL-star/ll-star.rb
79
+ - samples/standard/LL-star/output
140
80
  - samples/standard/calc/Calculator.g
141
81
  - samples/standard/calc/Calculator.py
142
82
  - samples/standard/calc/Calculator.rb
83
+ - samples/standard/cminus/CMinus.g
84
+ - samples/standard/cminus/bytecode.group
85
+ - samples/standard/cminus/cminus.rb
86
+ - samples/standard/cminus/input
87
+ - samples/standard/cminus/java.group
88
+ - samples/standard/cminus/output
89
+ - samples/standard/cminus/python.group
90
+ - samples/standard/dynamic-scope/DynamicScopes.g
91
+ - samples/standard/dynamic-scope/dynamic-scopes.rb
92
+ - samples/standard/dynamic-scope/input
93
+ - samples/standard/dynamic-scope/output
94
+ - samples/standard/fuzzy/FuzzyJava.g
95
+ - samples/standard/fuzzy/fuzzy.py
96
+ - samples/standard/fuzzy/fuzzy.rb
97
+ - samples/standard/fuzzy/input
98
+ - samples/standard/fuzzy/output
99
+ - samples/standard/hoisted-predicates/HoistedPredicates.g
100
+ - samples/standard/hoisted-predicates/hoisted-predicates.rb
101
+ - samples/standard/hoisted-predicates/input
102
+ - samples/standard/hoisted-predicates/output
143
103
  - samples/standard/island-grammar/Javadoc.g
144
- - samples/standard/island-grammar/output
104
+ - samples/standard/island-grammar/Simple.g
145
105
  - samples/standard/island-grammar/input
146
106
  - samples/standard/island-grammar/island.rb
147
- - samples/standard/island-grammar/Simple.g
148
- - samples/standard/python/output
149
- - samples/standard/python/PythonTokenSource.rb
107
+ - samples/standard/island-grammar/output
108
+ - samples/standard/java/Java.g
109
+ - samples/standard/java/input
110
+ - samples/standard/java/java.rb
111
+ - samples/standard/java/output
150
112
  - samples/standard/python/Python.g
113
+ - samples/standard/python/PythonTokenSource.rb
151
114
  - samples/standard/python/input
115
+ - samples/standard/python/output
152
116
  - samples/standard/python/python.rb
153
- - samples/standard/treeparser/treeparser.rb
154
- - samples/standard/treeparser/LangDumpDecl.g
155
- - samples/standard/treeparser/output
117
+ - samples/standard/rakefile
118
+ - samples/standard/scopes/SymbolTable.g
119
+ - samples/standard/scopes/input
120
+ - samples/standard/scopes/output
121
+ - samples/standard/scopes/scopes.rb
122
+ - samples/standard/simplecTreeParser/SimpleC.g
123
+ - samples/standard/simplecTreeParser/SimpleCWalker.g
124
+ - samples/standard/simplecTreeParser/input
125
+ - samples/standard/simplecTreeParser/output
126
+ - samples/standard/simplecTreeParser/simplec.rb
156
127
  - samples/standard/treeparser/Lang.g
128
+ - samples/standard/treeparser/LangDumpDecl.g
157
129
  - samples/standard/treeparser/input
158
- - samples/standard/fuzzy/fuzzy.py
159
- - samples/standard/fuzzy/FuzzyJava.g
160
- - samples/standard/fuzzy/output
161
- - samples/standard/fuzzy/input
162
- - samples/standard/fuzzy/fuzzy.rb
163
- - samples/standard/tweak/tweak.rb
164
- - samples/standard/tweak/output
130
+ - samples/standard/treeparser/output
131
+ - samples/standard/treeparser/treeparser.rb
165
132
  - samples/standard/tweak/Tweak.g
166
133
  - samples/standard/tweak/input
167
- - samples/standard/C/c.rb
168
- - samples/standard/C/C__testrig.st
169
- - samples/standard/C/C.g
170
- - samples/standard/C/output
171
- - samples/standard/C/input
172
- - samples/standard/C/C.tokens
173
- - samples/standard/dynamic-scope/output
174
- - samples/standard/dynamic-scope/DynamicScopes.g
175
- - samples/standard/dynamic-scope/input
176
- - samples/standard/dynamic-scope/dynamic-scopes.rb
177
- - samples/standard/LL-star/output
178
- - samples/standard/LL-star/input
179
- - samples/standard/LL-star/ll-star.rb
180
- - samples/standard/LL-star/LLStar.g
181
- - samples/standard/hoisted-predicates/hoisted-predicates.rb
182
- - samples/standard/hoisted-predicates/HoistedPredicates.g
183
- - samples/standard/hoisted-predicates/output
184
- - samples/standard/hoisted-predicates/input
185
- - History.txt
186
- - ANTLR-LICENSE.txt
187
- - DEVELOPER-README.rdoc
188
- - README.rdoc
189
- - java/antlr-full-3.5.jar
190
- - java/RubyTarget.java
191
- - rakefile
192
- - Manifest.txt
134
+ - samples/standard/tweak/output
135
+ - samples/standard/tweak/tweak.rb
136
+ - samples/standard/xml/README
137
+ - samples/standard/xml/XML.g
138
+ - samples/standard/xml/input
139
+ - samples/standard/xml/output
140
+ - samples/standard/xml/xml.rb
141
+ - templates/AST.stg
142
+ - templates/ASTDbg.stg
143
+ - templates/ASTParser.stg
144
+ - templates/ASTTreeParser.stg
145
+ - templates/Dbg.stg
146
+ - templates/Ruby.stg
147
+ - templates/ST.stg
148
+ - templates/Support.stg
149
+ - test/functional/ast-output/auto-ast.rb
150
+ - test/functional/ast-output/construction.rb
151
+ - test/functional/ast-output/hetero-nodes.rb
152
+ - test/functional/ast-output/rewrites.rb
153
+ - test/functional/ast-output/tree-rewrite.rb
154
+ - test/functional/debugging/debug-mode.rb
155
+ - test/functional/debugging/profile-mode.rb
156
+ - test/functional/debugging/rule-tracing.rb
157
+ - test/functional/delegation/import.rb
158
+ - test/functional/lexer/basic.rb
159
+ - test/functional/lexer/filter-mode.rb
160
+ - test/functional/lexer/nuances.rb
161
+ - test/functional/lexer/properties.rb
162
+ - test/functional/lexer/syn-pred.rb
163
+ - test/functional/lexer/xml.rb
164
+ - test/functional/main/main-scripts.rb
165
+ - test/functional/parser/actions.rb
166
+ - test/functional/parser/backtracking.rb
167
+ - test/functional/parser/basic.rb
168
+ - test/functional/parser/calc.rb
169
+ - test/functional/parser/ll-star.rb
170
+ - test/functional/parser/nuances.rb
171
+ - test/functional/parser/predicates.rb
172
+ - test/functional/parser/properties.rb
173
+ - test/functional/parser/rule-methods.rb
174
+ - test/functional/parser/scopes.rb
175
+ - test/functional/template-output/template-output.rb
176
+ - test/functional/token-rewrite/basic.rb
177
+ - test/functional/token-rewrite/via-parser.rb
178
+ - test/functional/tree-parser/basic.rb
179
+ - test/unit/sample-input/file-stream-1
180
+ - test/unit/sample-input/template-group
181
+ - test/unit/sample-input/teststreams.input2
182
+ - test/unit/test-dfa.rb
183
+ - test/unit/test-exceptions.rb
184
+ - test/unit/test-recognizers.rb
185
+ - test/unit/test-scheme.rb
186
+ - test/unit/test-scope.rb
187
+ - test/unit/test-streams.rb
188
+ - test/unit/test-template.rb
189
+ - test/unit/test-tree-wizard.rb
190
+ - test/unit/test-trees.rb
191
+ - test/unit/test-unicode-stream.rb
193
192
  homepage: http://antlr.ohboyohboyohboy.org/
194
193
  licenses:
195
194
  - BSD
196
195
  metadata: {}
197
- post_install_message:
198
196
  rdoc_options: []
199
197
  require_paths:
200
198
  - lib
201
199
  required_ruby_version: !ruby/object:Gem::Requirement
202
200
  requirements:
203
- - - '>='
201
+ - - ">="
204
202
  - !ruby/object:Gem::Version
205
203
  version: 1.8.7
206
204
  required_rubygems_version: !ruby/object:Gem::Requirement
207
205
  requirements:
208
- - - '>='
206
+ - - ">="
209
207
  - !ruby/object:Gem::Version
210
208
  version: '0'
211
209
  requirements:
212
210
  - java (>= v6)
213
- rubyforge_project: antlr3
214
- rubygems_version: 2.0.3
215
- signing_key:
211
+ rubygems_version: 3.7.2
216
212
  specification_version: 4
217
213
  summary: Fully-featured ruby parser generation for ANTLR version 3.
218
214
  test_files:
219
- - test/unit/test-exceptions.rb
220
- - test/unit/test-trees.rb
221
- - test/unit/test-scope.rb
222
- - test/unit/test-tree-wizard.rb
223
- - test/unit/test-streams.rb
224
- - test/unit/test-recognizers.rb
225
- - test/unit/test-template.rb
226
- - test/unit/test-unicode-stream.rb
227
- - test/unit/test-dfa.rb
228
- - test/unit/test-scheme.rb
229
- - test/functional/tree-parser/basic.rb
230
- - test/functional/parser/actions.rb
231
- - test/functional/parser/predicates.rb
232
- - test/functional/parser/calc.rb
233
- - test/functional/parser/basic.rb
234
- - test/functional/parser/rule-methods.rb
235
- - test/functional/parser/properties.rb
236
- - test/functional/parser/scopes.rb
237
- - test/functional/parser/nuances.rb
238
- - test/functional/parser/backtracking.rb
239
- - test/functional/parser/ll-star.rb
240
- - test/functional/debugging/rule-tracing.rb
241
- - test/functional/debugging/profile-mode.rb
242
- - test/functional/debugging/debug-mode.rb
243
- - test/functional/main/main-scripts.rb
244
- - test/functional/lexer/filter-mode.rb
245
- - test/functional/lexer/basic.rb
246
- - test/functional/lexer/properties.rb
247
- - test/functional/lexer/xml.rb
248
- - test/functional/lexer/nuances.rb
249
- - test/functional/lexer/syn-pred.rb
215
+ - test/functional/ast-output/auto-ast.rb
250
216
  - test/functional/ast-output/construction.rb
251
217
  - test/functional/ast-output/hetero-nodes.rb
252
- - test/functional/ast-output/tree-rewrite.rb
253
- - test/functional/ast-output/auto-ast.rb
254
218
  - test/functional/ast-output/rewrites.rb
219
+ - test/functional/ast-output/tree-rewrite.rb
220
+ - test/functional/debugging/debug-mode.rb
221
+ - test/functional/debugging/profile-mode.rb
222
+ - test/functional/debugging/rule-tracing.rb
255
223
  - test/functional/delegation/import.rb
224
+ - test/functional/lexer/basic.rb
225
+ - test/functional/lexer/filter-mode.rb
226
+ - test/functional/lexer/nuances.rb
227
+ - test/functional/lexer/properties.rb
228
+ - test/functional/lexer/syn-pred.rb
229
+ - test/functional/lexer/xml.rb
230
+ - test/functional/main/main-scripts.rb
231
+ - test/functional/parser/actions.rb
232
+ - test/functional/parser/backtracking.rb
233
+ - test/functional/parser/basic.rb
234
+ - test/functional/parser/calc.rb
235
+ - test/functional/parser/ll-star.rb
236
+ - test/functional/parser/nuances.rb
237
+ - test/functional/parser/predicates.rb
238
+ - test/functional/parser/properties.rb
239
+ - test/functional/parser/rule-methods.rb
240
+ - test/functional/parser/scopes.rb
241
+ - test/functional/template-output/template-output.rb
256
242
  - test/functional/token-rewrite/basic.rb
257
243
  - test/functional/token-rewrite/via-parser.rb
258
- - test/functional/template-output/template-output.rb
244
+ - test/functional/tree-parser/basic.rb
245
+ - test/unit/test-dfa.rb
246
+ - test/unit/test-exceptions.rb
247
+ - test/unit/test-recognizers.rb
248
+ - test/unit/test-scheme.rb
249
+ - test/unit/test-scope.rb
250
+ - test/unit/test-streams.rb
251
+ - test/unit/test-template.rb
252
+ - test/unit/test-tree-wizard.rb
253
+ - test/unit/test-trees.rb
254
+ - test/unit/test-unicode-stream.rb