Lines Matching refs:parser
279 if name =~ /(\w+)::(Lexer|Parser|TreeParser)$/
363 generated parser file is run directly from the command line.
392 opt.separator( "Parser Configuration:" )
407 opt.on( '--rule NAME', "name of the parser rule to execute" ) { |val| @parser_rule = val }
443 fail( "a parser rule name must be specified via --rule NAME" )
458 parser = @parser_class.new( lexer, parser_options )
459 result = parser.send( @parser_rule ) and present( result )
460 @profile and puts( parser.generate_report )
482 generated tree walker (tree parser) file is run directly from the command line.
506 opt.separator "Tree Parser Configuration:"
521 '--parser-name CLASS_NAME',
522 'full name of the parser class to use'
525 '--parser-file PATH_TO_LIBRARY',
526 'path to load to make the parser class available'
531 warn( "unable to load the library specified by --parser-file: #{ $! }" )
535 opt.on( '--parser-rule NAME', "name of the parser rule to use on the input" ) { |val| @parser_rule = val }
536 opt.on( '--rule NAME', "name of the rule to invoke in the tree parser" ) { |val| @walker_rule = val }
558 fail( "unable to locate the parser class #@parser_class_name" )
570 @parser = @parser_class.new( @token_stream )
571 if result = @parser.send( @parser_rule )
572 result.respond_to?( :tree ) or fail( "Parser
581 else puts!( "parser.#@parser_rule returned nil" )