Class: ANTLR3::CompileTask::GrammarFile::Imported
- Inherits:
-
ANTLR3::CompileTask::GrammarFile
- Object
- ANTLR3::CompileTask::GrammarFile
- ANTLR3::CompileTask::GrammarFile::Imported
- Defined in:
- lib/antlr3/task.rb
Overview
class Grammar
Constant Summary
Constants inherited from ANTLR3::CompileTask::GrammarFile
Instance Attribute Summary
Attributes inherited from ANTLR3::CompileTask::GrammarFile
#group, #imported_grammars, #imports, #language, #name, #path, #source, #token_vocab, #type
Instance Method Summary collapse
- #delegate_files(suffix) ⇒ Object
-
#initialize(owner, path) ⇒ Imported
constructor
A new instance of Imported.
- #target_files ⇒ Object
Methods inherited from ANTLR3::CompileTask::GrammarFile
#all_imported_files, #clean, #define_tasks, #file_names, #lexer_files, #parser_files, #tokens_file, #tree_parser_files, #update
Constructor Details
#initialize(owner, path) ⇒ Imported
Returns a new instance of Imported.
437 438 439 440 441 442 443 444 445 |
# File 'lib/antlr3/task.rb', line 437 def initialize( owner, path ) @owner = owner @path = path.to_s @imports = [] @language = 'Java' @token_vocab = nil study fetch_imports end |
Instance Method Details
#delegate_files(suffix) ⇒ Object
455 456 457 |
# File 'lib/antlr3/task.rb', line 455 def delegate_files( suffix ) @owner.delegate_files( "#{ @name }_#{ suffix }" ) end |
#target_files ⇒ Object
459 460 461 462 463 |
# File 'lib/antlr3/task.rb', line 459 def target_files targets = [ tokens_file ] targets.concat( @owner.delegate_files( @name ) ) return( targets ) end |