Class: Depager::LALR::ParserGenerator
- Inherits:
-
ParserGenerator
- Object
- Generator
- ParserGenerator
- Depager::LALR::ParserGenerator
- Defined in:
- lib/depager/lr.rb
Constant Summary
Constants inherited from Generator
Instance Attribute Summary
Attributes inherited from Generator
#d_parser, #decorators, #g_parser, #inner_code, #options, #outer_code, #parsing_method, #requirements, #setup_code
Instance Method Summary collapse
-
#initialize(d_parser) ⇒ ParserGenerator
constructor
A new instance of ParserGenerator.
- #parser_code_template ⇒ Object
Methods inherited from ParserGenerator
Methods inherited from Generator
#generate_code, #parse_block, #parse_common, #parse_prec
Methods included from Utils::CommonMethods
#error_exit, #error_message, #expanded_code_delimiter, #file, #full_target_name, #input_path, #inspect, #target_name, #target_namespace, #warning
Constructor Details
#initialize(d_parser) ⇒ ParserGenerator
Returns a new instance of ParserGenerator.
5 6 7 8 |
# File 'lib/depager/lr.rb', line 5 def initialize(d_parser) super @parsing_method = Depager::LALR end |
Instance Method Details
#parser_code_template ⇒ Object
10 11 12 |
# File 'lib/depager/lr.rb', line 10 def parser_code_template File.read("#{TEMPLATES_DIR}/single_lalr_parser.erb") end |