Class: ANTLR3::Test::Functional
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- ANTLR3::Test::Functional
show all
- Extended by:
- GrammarManager
- Defined in:
- lib/antlr3/test/functional.rb
Overview
Constant Summary
GrammarManager::DEFAULT_COMPILE_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
add_default_compile_option, compile, compile_options, const_missing, grammar_count, grammars, load_grammar
Methods included from NameSpace
#import, #import_grammar_targets
Methods included from Location
#test_directory, #test_group
Class Method Details
.inherited(klass) ⇒ Object
158
159
160
161
|
# File 'lib/antlr3/test/functional.rb', line 158
def self.inherited( klass )
super
klass.test_path = call_stack[ 0 ].file
end
|
Instance Method Details
#compile_and_load(grammar, options = {}) ⇒ Object
183
184
185
|
# File 'lib/antlr3/test/functional.rb', line 183
def compile_and_load( grammar, options = {} )
self.class.compile( grammar, options )
end
|
#inline_grammar(source) ⇒ Object
175
176
177
178
179
180
181
|
# File 'lib/antlr3/test/functional.rb', line 175
def inline_grammar( source )
call = call_stack.find { |call| call.file != __FILE__ }
grammar = Grammar.inline source,
:output_directory => output_directory,
:file => call.file,
:line => call.line
end
|
#local_path(*args) ⇒ Object
163
164
165
|
# File 'lib/antlr3/test/functional.rb', line 163
def local_path( *args )
self.class.local_path( *args )
end
|
#output_directory ⇒ Object
171
172
173
|
# File 'lib/antlr3/test/functional.rb', line 171
def output_directory
self.class.output_directory
end
|
#test_path ⇒ Object
167
168
169
|
# File 'lib/antlr3/test/functional.rb', line 167
def test_path
self.class.test_path
end
|