Class: Lrama::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/lrama/options.rb

Overview

Command line options.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/lrama/options.rb', line 12

def initialize
  @skeleton = "bison/yacc.c"
  @define = {}
  @header = false
  @header_file = nil
  @report_file = nil
  @outfile = "y.tab.c"
  @error_recovery = false
  @grammar_file = nil
  @trace_opts = nil
  @report_opts = nil
  @diagnostic = false
  @y = STDIN
  @debug = false
end

Instance Attribute Details

#debugObject

Returns the value of attribute debug.



6
7
8
# File 'lib/lrama/options.rb', line 6

def debug
  @debug
end

#defineObject

Returns the value of attribute define.



6
7
8
# File 'lib/lrama/options.rb', line 6

def define
  @define
end

#diagnosticObject

Returns the value of attribute diagnostic.



6
7
8
# File 'lib/lrama/options.rb', line 6

def diagnostic
  @diagnostic
end

#error_recoveryObject

Returns the value of attribute error_recovery.



6
7
8
# File 'lib/lrama/options.rb', line 6

def error_recovery
  @error_recovery
end

#grammar_fileObject

Returns the value of attribute grammar_file.



6
7
8
# File 'lib/lrama/options.rb', line 6

def grammar_file
  @grammar_file
end

#headerObject

Returns the value of attribute header.



6
7
8
# File 'lib/lrama/options.rb', line 6

def header
  @header
end

#header_fileObject

Returns the value of attribute header_file.



6
7
8
# File 'lib/lrama/options.rb', line 6

def header_file
  @header_file
end

#outfileObject

Returns the value of attribute outfile.



6
7
8
# File 'lib/lrama/options.rb', line 6

def outfile
  @outfile
end

#report_fileObject

Returns the value of attribute report_file.



6
7
8
# File 'lib/lrama/options.rb', line 6

def report_file
  @report_file
end

#report_optsObject

Returns the value of attribute report_opts.



6
7
8
# File 'lib/lrama/options.rb', line 6

def report_opts
  @report_opts
end

#skeletonObject

Returns the value of attribute skeleton.



6
7
8
# File 'lib/lrama/options.rb', line 6

def skeleton
  @skeleton
end

#trace_optsObject

Returns the value of attribute trace_opts.



6
7
8
# File 'lib/lrama/options.rb', line 6

def trace_opts
  @trace_opts
end

#yObject

Returns the value of attribute y.



6
7
8
# File 'lib/lrama/options.rb', line 6

def y
  @y
end