Class: Racc::UserAction

### Home Classes Methods

### In Files

- lib/racc/grammar.rb

### Parent

Object

### Methods

- ::empty
- ::new
- ::proc
- ::source_text
- #empty?
- #inspect
- #name
- #proc?
- #source?

### 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::UserAction

### Attributes

proc[R]
source[R]

### Public Class Methods

empty() click to toggle source

    # File lib/racc/grammar.rb, line 737
    def UserAction.empty
      new(nil, nil)
    end

new(src, proc) click to toggle source

    # File lib/racc/grammar.rb, line 743
    def initialize(src, proc)
      @source = src
      @proc = proc
    end

proc(pr = nil, &block) click to toggle source

    # File lib/racc/grammar.rb, line 730
    def UserAction.proc(pr = nil, &block)
      if pr and block
        raise ArgumentError, "both of argument and block given"
      end
      new(nil, pr || block)
    end

source_text(src) click to toggle source

    # File lib/racc/grammar.rb, line 726
    def UserAction.source_text(src)
      new(src, nil)
    end

### Public Instance Methods

empty?() click to toggle source

    # File lib/racc/grammar.rb, line 759
    def empty?
      not @proc and not @source
    end

inspect() click to toggle source
Alias for: name
name() click to toggle source

    # File lib/racc/grammar.rb, line 763
    def name
      "{action type=#{@source || @proc || 'nil'}}"
    end

Also aliased as: inspect
proc?() click to toggle source

    # File lib/racc/grammar.rb, line 755
    def proc?
      not @source
    end

source?() click to toggle source

    # File lib/racc/grammar.rb, line 751
    def source?
      not @proc
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.