antlr3 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ANTLR-LICENSE.txt +26 -0
- data/History.txt +66 -0
- data/README.txt +139 -0
- data/bin/antlr4ruby +33 -0
- data/java/RubyTarget.java +524 -0
- data/java/antlr-full-3.2.1.jar +0 -0
- data/lib/antlr3.rb +176 -0
- data/lib/antlr3/constants.rb +88 -0
- data/lib/antlr3/debug.rb +701 -0
- data/lib/antlr3/debug/event-hub.rb +210 -0
- data/lib/antlr3/debug/record-event-listener.rb +25 -0
- data/lib/antlr3/debug/rule-tracer.rb +55 -0
- data/lib/antlr3/debug/socket.rb +360 -0
- data/lib/antlr3/debug/trace-event-listener.rb +92 -0
- data/lib/antlr3/dfa.rb +247 -0
- data/lib/antlr3/dot.rb +174 -0
- data/lib/antlr3/error.rb +657 -0
- data/lib/antlr3/main.rb +561 -0
- data/lib/antlr3/modes/ast-builder.rb +41 -0
- data/lib/antlr3/modes/filter.rb +56 -0
- data/lib/antlr3/profile.rb +322 -0
- data/lib/antlr3/recognizers.rb +1280 -0
- data/lib/antlr3/streams.rb +985 -0
- data/lib/antlr3/streams/interactive.rb +91 -0
- data/lib/antlr3/streams/rewrite.rb +412 -0
- data/lib/antlr3/test/call-stack.rb +57 -0
- data/lib/antlr3/test/config.rb +23 -0
- data/lib/antlr3/test/core-extensions.rb +269 -0
- data/lib/antlr3/test/diff.rb +165 -0
- data/lib/antlr3/test/functional.rb +207 -0
- data/lib/antlr3/test/grammar.rb +371 -0
- data/lib/antlr3/token.rb +592 -0
- data/lib/antlr3/tree.rb +1415 -0
- data/lib/antlr3/tree/debug.rb +163 -0
- data/lib/antlr3/tree/visitor.rb +84 -0
- data/lib/antlr3/tree/wizard.rb +481 -0
- data/lib/antlr3/util.rb +149 -0
- data/lib/antlr3/version.rb +27 -0
- data/samples/ANTLRv3Grammar.g +621 -0
- data/samples/Cpp.g +749 -0
- data/templates/AST.stg +335 -0
- data/templates/ASTDbg.stg +40 -0
- data/templates/ASTParser.stg +153 -0
- data/templates/ASTTreeParser.stg +272 -0
- data/templates/Dbg.stg +192 -0
- data/templates/Ruby.stg +1514 -0
- data/test/functional/ast-output/auto-ast.rb +797 -0
- data/test/functional/ast-output/construction.rb +555 -0
- data/test/functional/ast-output/hetero-nodes.rb +753 -0
- data/test/functional/ast-output/rewrites.rb +1327 -0
- data/test/functional/ast-output/tree-rewrite.rb +1662 -0
- data/test/functional/debugging/debug-mode.rb +689 -0
- data/test/functional/debugging/profile-mode.rb +165 -0
- data/test/functional/debugging/rule-tracing.rb +74 -0
- data/test/functional/delegation/import.rb +379 -0
- data/test/functional/lexer/basic.rb +559 -0
- data/test/functional/lexer/filter-mode.rb +245 -0
- data/test/functional/lexer/nuances.rb +47 -0
- data/test/functional/lexer/properties.rb +104 -0
- data/test/functional/lexer/syn-pred.rb +32 -0
- data/test/functional/lexer/xml.rb +206 -0
- data/test/functional/main/main-scripts.rb +245 -0
- data/test/functional/parser/actions.rb +224 -0
- data/test/functional/parser/backtracking.rb +244 -0
- data/test/functional/parser/basic.rb +282 -0
- data/test/functional/parser/calc.rb +98 -0
- data/test/functional/parser/ll-star.rb +143 -0
- data/test/functional/parser/nuances.rb +165 -0
- data/test/functional/parser/predicates.rb +103 -0
- data/test/functional/parser/properties.rb +242 -0
- data/test/functional/parser/rule-methods.rb +132 -0
- data/test/functional/parser/scopes.rb +274 -0
- data/test/functional/token-rewrite/basic.rb +318 -0
- data/test/functional/token-rewrite/via-parser.rb +100 -0
- data/test/functional/tree-parser/basic.rb +750 -0
- data/test/unit/sample-input/file-stream-1 +2 -0
- data/test/unit/sample-input/teststreams.input2 +2 -0
- data/test/unit/test-dfa.rb +52 -0
- data/test/unit/test-exceptions.rb +44 -0
- data/test/unit/test-recognizers.rb +55 -0
- data/test/unit/test-scheme.rb +62 -0
- data/test/unit/test-streams.rb +459 -0
- data/test/unit/test-tree-wizard.rb +535 -0
- data/test/unit/test-trees.rb +854 -0
- metadata +205 -0
metadata
ADDED
@@ -0,0 +1,205 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: antlr3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kyle Yetter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-12-23 00:00:00 -05:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: |-
|
17
|
+
Fully-featured ANTLR 3 parser generation for Ruby.
|
18
|
+
|
19
|
+
ANTLR (ANother Tool for Language Recognition) is a tool that is used to generate
|
20
|
+
code for performing a variety of language recognition tasks: lexing, parsing,
|
21
|
+
abstract syntax tree construction and manipulation, tree structure recognition,
|
22
|
+
and input translation. The tool operates simillarly to other parser generators,
|
23
|
+
taking in a grammar specification written in the special ANTLR metalanguage and
|
24
|
+
producing source code that implements the recognition functionality.
|
25
|
+
|
26
|
+
While the tool itself is implemented in Java, it has an extensible design that
|
27
|
+
allows for code generation in other programming languages. To implement an
|
28
|
+
ANTLR language target, a developer may supply a set of templates written in the
|
29
|
+
StringTemplate (http://www.stringtemplate.org) language.
|
30
|
+
|
31
|
+
ANTLR is currently distributed with a fairly limited Ruby target implementation.
|
32
|
+
While it does provide implementation for basic lexer and parser classes, the
|
33
|
+
target does not provide any implementation for abstract syntax tree
|
34
|
+
construction, tree parser class generation, input translation, or a number of
|
35
|
+
the other ANTLR features that give the program an edge over traditional code
|
36
|
+
generators.
|
37
|
+
|
38
|
+
This gem packages together a complete implementation of the majority of features
|
39
|
+
ANTLR provides for other language targets, such as Java and Python. It contains:
|
40
|
+
|
41
|
+
* A customized version of the latest ANTLR program, bundling all necessary
|
42
|
+
java code and templates for producing fully featured language recognition
|
43
|
+
in ruby code
|
44
|
+
|
45
|
+
* a ruby runtime library that collects classes used throughout the code that
|
46
|
+
ANTLR generates
|
47
|
+
|
48
|
+
* a wrapper script, `antlr4ruby', which executes the ANTLR command line tool
|
49
|
+
after ensuring the ANTLR jar is java's class path
|
50
|
+
email: kcy5b@yahoo.com
|
51
|
+
executables:
|
52
|
+
- antlr4ruby
|
53
|
+
extensions: []
|
54
|
+
|
55
|
+
extra_rdoc_files: []
|
56
|
+
|
57
|
+
files:
|
58
|
+
- lib/antlr3/main.rb
|
59
|
+
- lib/antlr3/recognizers.rb
|
60
|
+
- lib/antlr3/modes/ast-builder.rb
|
61
|
+
- lib/antlr3/modes/filter.rb
|
62
|
+
- lib/antlr3/streams/rewrite.rb
|
63
|
+
- lib/antlr3/streams/interactive.rb
|
64
|
+
- lib/antlr3/debug.rb
|
65
|
+
- lib/antlr3/dot.rb
|
66
|
+
- lib/antlr3/streams.rb
|
67
|
+
- lib/antlr3/debug/record-event-listener.rb
|
68
|
+
- lib/antlr3/debug/rule-tracer.rb
|
69
|
+
- lib/antlr3/debug/socket.rb
|
70
|
+
- lib/antlr3/debug/trace-event-listener.rb
|
71
|
+
- lib/antlr3/debug/event-hub.rb
|
72
|
+
- lib/antlr3/version.rb
|
73
|
+
- lib/antlr3/error.rb
|
74
|
+
- lib/antlr3/tree.rb
|
75
|
+
- lib/antlr3/test/diff.rb
|
76
|
+
- lib/antlr3/test/functional.rb
|
77
|
+
- lib/antlr3/test/call-stack.rb
|
78
|
+
- lib/antlr3/test/grammar.rb
|
79
|
+
- lib/antlr3/test/core-extensions.rb
|
80
|
+
- lib/antlr3/test/config.rb
|
81
|
+
- lib/antlr3/dfa.rb
|
82
|
+
- lib/antlr3/profile.rb
|
83
|
+
- lib/antlr3/tree/visitor.rb
|
84
|
+
- lib/antlr3/tree/debug.rb
|
85
|
+
- lib/antlr3/tree/wizard.rb
|
86
|
+
- lib/antlr3/token.rb
|
87
|
+
- lib/antlr3/constants.rb
|
88
|
+
- lib/antlr3/util.rb
|
89
|
+
- lib/antlr3.rb
|
90
|
+
- test/unit/test-dfa.rb
|
91
|
+
- test/unit/sample-input/file-stream-1
|
92
|
+
- test/unit/sample-input/teststreams.input2
|
93
|
+
- test/unit/test-tree-wizard.rb
|
94
|
+
- test/unit/test-streams.rb
|
95
|
+
- test/unit/test-recognizers.rb
|
96
|
+
- test/unit/test-trees.rb
|
97
|
+
- test/unit/test-exceptions.rb
|
98
|
+
- test/unit/test-scheme.rb
|
99
|
+
- test/functional/delegation/import.rb
|
100
|
+
- test/functional/lexer/xml.rb
|
101
|
+
- test/functional/lexer/properties.rb
|
102
|
+
- test/functional/lexer/nuances.rb
|
103
|
+
- test/functional/lexer/basic.rb
|
104
|
+
- test/functional/lexer/filter-mode.rb
|
105
|
+
- test/functional/lexer/syn-pred.rb
|
106
|
+
- test/functional/debugging/rule-tracing.rb
|
107
|
+
- test/functional/debugging/profile-mode.rb
|
108
|
+
- test/functional/debugging/debug-mode.rb
|
109
|
+
- test/functional/ast-output/hetero-nodes.rb
|
110
|
+
- test/functional/ast-output/construction.rb
|
111
|
+
- test/functional/ast-output/rewrites.rb
|
112
|
+
- test/functional/ast-output/tree-rewrite.rb
|
113
|
+
- test/functional/ast-output/auto-ast.rb
|
114
|
+
- test/functional/main/main-scripts.rb
|
115
|
+
- test/functional/tree-parser/basic.rb
|
116
|
+
- test/functional/parser/predicates.rb
|
117
|
+
- test/functional/parser/backtracking.rb
|
118
|
+
- test/functional/parser/properties.rb
|
119
|
+
- test/functional/parser/nuances.rb
|
120
|
+
- test/functional/parser/rule-methods.rb
|
121
|
+
- test/functional/parser/basic.rb
|
122
|
+
- test/functional/parser/actions.rb
|
123
|
+
- test/functional/parser/calc.rb
|
124
|
+
- test/functional/parser/ll-star.rb
|
125
|
+
- test/functional/parser/scopes.rb
|
126
|
+
- test/functional/token-rewrite/via-parser.rb
|
127
|
+
- test/functional/token-rewrite/basic.rb
|
128
|
+
- templates/ASTDbg.stg
|
129
|
+
- templates/AST.stg
|
130
|
+
- templates/Ruby.stg
|
131
|
+
- templates/Dbg.stg
|
132
|
+
- templates/ASTParser.stg
|
133
|
+
- templates/ASTTreeParser.stg
|
134
|
+
- samples/Cpp.g
|
135
|
+
- samples/ANTLRv3Grammar.g
|
136
|
+
- README.txt
|
137
|
+
- ANTLR-LICENSE.txt
|
138
|
+
- History.txt
|
139
|
+
- java/antlr-full-3.2.1.jar
|
140
|
+
- java/RubyTarget.java
|
141
|
+
has_rdoc: true
|
142
|
+
homepage:
|
143
|
+
licenses: []
|
144
|
+
|
145
|
+
post_install_message:
|
146
|
+
rdoc_options: []
|
147
|
+
|
148
|
+
require_paths:
|
149
|
+
- lib
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 1.8.7
|
155
|
+
version:
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: "0"
|
161
|
+
version:
|
162
|
+
requirements:
|
163
|
+
- java
|
164
|
+
rubyforge_project: antlr3
|
165
|
+
rubygems_version: 1.3.5
|
166
|
+
signing_key:
|
167
|
+
specification_version: 3
|
168
|
+
summary: Fully-featured ruby parser generation for ANTLR version 3.
|
169
|
+
test_files:
|
170
|
+
- test/unit/test-dfa.rb
|
171
|
+
- test/unit/test-tree-wizard.rb
|
172
|
+
- test/unit/test-streams.rb
|
173
|
+
- test/unit/test-recognizers.rb
|
174
|
+
- test/unit/test-trees.rb
|
175
|
+
- test/unit/test-exceptions.rb
|
176
|
+
- test/unit/test-scheme.rb
|
177
|
+
- test/functional/delegation/import.rb
|
178
|
+
- test/functional/lexer/xml.rb
|
179
|
+
- test/functional/lexer/properties.rb
|
180
|
+
- test/functional/lexer/nuances.rb
|
181
|
+
- test/functional/lexer/basic.rb
|
182
|
+
- test/functional/lexer/filter-mode.rb
|
183
|
+
- test/functional/lexer/syn-pred.rb
|
184
|
+
- test/functional/debugging/rule-tracing.rb
|
185
|
+
- test/functional/debugging/profile-mode.rb
|
186
|
+
- test/functional/debugging/debug-mode.rb
|
187
|
+
- test/functional/ast-output/hetero-nodes.rb
|
188
|
+
- test/functional/ast-output/construction.rb
|
189
|
+
- test/functional/ast-output/rewrites.rb
|
190
|
+
- test/functional/ast-output/tree-rewrite.rb
|
191
|
+
- test/functional/ast-output/auto-ast.rb
|
192
|
+
- test/functional/main/main-scripts.rb
|
193
|
+
- test/functional/tree-parser/basic.rb
|
194
|
+
- test/functional/parser/predicates.rb
|
195
|
+
- test/functional/parser/backtracking.rb
|
196
|
+
- test/functional/parser/properties.rb
|
197
|
+
- test/functional/parser/nuances.rb
|
198
|
+
- test/functional/parser/rule-methods.rb
|
199
|
+
- test/functional/parser/basic.rb
|
200
|
+
- test/functional/parser/actions.rb
|
201
|
+
- test/functional/parser/calc.rb
|
202
|
+
- test/functional/parser/ll-star.rb
|
203
|
+
- test/functional/parser/scopes.rb
|
204
|
+
- test/functional/token-rewrite/via-parser.rb
|
205
|
+
- test/functional/token-rewrite/basic.rb
|