Class: Racc::GrammarFileParser

### Home Classes Methods

### In Files

- lib/racc/grammarfileparser.rb

### Parent

Object

### Namespace

- CLASS Racc::GrammarFileParser::Result

### Methods

- ::new
- ::parse
- ::parse_file
- #parse

### Files

- Manifest.txt
- README.rdoc
- pre-setup
- NEWS.en.rdoc
- grammar.en.rdoc

### Class/Module Index

Quicksearch

- Racc
- Racc::Accept
- Racc::ActionTable
- Racc::CompileError
- Racc::DebugFlags
- Racc::Error
- Racc::Goto
- Racc::Grammar
- Racc::Grammar::DefinitionEnv
- Racc::Grammar::PrecedenceDefinitionEnv
- Racc::GrammarFileParser
- Racc::GrammarFileParser::Result
- Racc::GrammarFileScanner
- Racc::ISet
- Racc::Item
- Racc::LocationPointer
- Racc::LogFileGenerator
- Racc::OrMark
- Racc::ParseError
- Racc::ParseError
- Racc::Parser
- Racc::ParserClassGenerator
- Racc::ParserFileGenerator
- Racc::ParserFileGenerator::Params
- Racc::Prec
- Racc::RRconflict
- Racc::Reduce
- Racc::Rule
- Racc::SRconflict
- Racc::Shift
- Racc::SourceText
- Racc::State
- Racc::StateTransitionTable
- Racc::StateTransitionTableGenerator
- Racc::States
- Racc::Sym
- Racc::SymbolTable
- Racc::UserAction
- Object
- Object::ParseError
- Array

No matching classes.

# Racc::GrammarFileParser

### Constants

USER_CODE_LABELS

### Public Class Methods

new(debug_flags = DebugFlags.new) click to toggle source

    # File lib/racc/grammarfileparser.rb, line 172
    def initialize(debug_flags = DebugFlags.new)
      @yydebug = debug_flags.parse
    end

parse(src, filename = '-', lineno = 1) click to toggle source

    # File lib/racc/grammarfileparser.rb, line 168
    def GrammarFileParser.parse(src, filename = '-', lineno = 1)
      new().parse(src, filename, lineno)
    end

parse_file(filename) click to toggle source

    # File lib/racc/grammarfileparser.rb, line 164
    def GrammarFileParser.parse_file(filename)
      parse(File.read(filename), filename, 1)
    end

### Public Instance Methods

parse(src, filename = '-', lineno = 1) click to toggle source

    # File lib/racc/grammarfileparser.rb, line 176
    def parse(src, filename = '-', lineno = 1)
      @filename = filename
      @lineno = lineno
      @scanner = GrammarFileScanner.new(src, @filename)
      @scanner.debug = @yydebug
      @grammar = Grammar.new
      @result = Result.new(@grammar)
      @embedded_action_seq = 0
      yyparse @scanner, :yylex
      parse_user_code
      @result.grammar.init
      @result
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.