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.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/lrama/options.rb', line 26

def initialize
  @skeleton = "bison/yacc.c"
  @locations = false
  @define = {}
  @header = false
  @header_file = nil
  @report_file = nil
  @outfile = "y.tab.c"
  @error_recovery = false
  @grammar_file = ''
  @trace_opts = nil
  @report_opts = nil
  @warnings = false
  @y = STDIN
  @debug = false
  @diagram = false
  @diagram_file = "diagram.html"
  @profile_opts = nil
end

Instance Attribute Details

#debugObject

: bool



19
20
21
# File 'lib/lrama/options.rb', line 19

def debug
  @debug
end

#defineObject

: Hash[String, String]



20
21
22
# File 'lib/lrama/options.rb', line 20

def define
  @define
end

#diagramObject

: bool



21
22
23
# File 'lib/lrama/options.rb', line 21

def diagram
  @diagram
end

#diagram_fileObject

: String



22
23
24
# File 'lib/lrama/options.rb', line 22

def diagram_file
  @diagram_file
end

#error_recoveryObject

: bool



13
14
15
# File 'lib/lrama/options.rb', line 13

def error_recovery
  @error_recovery
end

#grammar_fileObject

: String



14
15
16
# File 'lib/lrama/options.rb', line 14

def grammar_file
  @grammar_file
end

#headerObject

: bool



9
10
11
# File 'lib/lrama/options.rb', line 9

def header
  @header
end

#header_fileObject

: String?



10
11
12
# File 'lib/lrama/options.rb', line 10

def header_file
  @header_file
end

#locationsObject

: bool



8
9
10
# File 'lib/lrama/options.rb', line 8

def locations
  @locations
end

#outfileObject

: String



12
13
14
# File 'lib/lrama/options.rb', line 12

def outfile
  @outfile
end

#profile_optsObject

: Hash[Symbol, bool]?



23
24
25
# File 'lib/lrama/options.rb', line 23

def profile_opts
  @profile_opts
end

#report_fileObject

: String?



11
12
13
# File 'lib/lrama/options.rb', line 11

def report_file
  @report_file
end

#report_optsObject

: Hash[Symbol, bool]?



16
17
18
# File 'lib/lrama/options.rb', line 16

def report_opts
  @report_opts
end

#skeletonObject

: String



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

def skeleton
  @skeleton
end

#trace_optsObject

: Hash[Symbol, bool]?



15
16
17
# File 'lib/lrama/options.rb', line 15

def trace_opts
  @trace_opts
end

#warningsObject

: bool



17
18
19
# File 'lib/lrama/options.rb', line 17

def warnings
  @warnings
end

#yObject

: IO



18
19
20
# File 'lib/lrama/options.rb', line 18

def y
  @y
end