Class: Lrama::Options
- Inherits:
-
Object
- Object
- Lrama::Options
- Defined in:
- lib/lrama/options.rb
Overview
Command line options.
Instance Attribute Summary collapse
-
#debug ⇒ Object
: bool.
-
#define ⇒ Object
: Hash[String, String].
-
#diagram ⇒ Object
: bool.
-
#diagram_file ⇒ Object
: String.
-
#error_recovery ⇒ Object
: bool.
-
#grammar_file ⇒ Object
: String.
-
#header ⇒ Object
: bool.
-
#header_file ⇒ Object
: String?.
-
#locations ⇒ Object
: bool.
-
#outfile ⇒ Object
: String.
-
#profile_opts ⇒ Object
: Hash[Symbol, bool]?.
-
#report_file ⇒ Object
: String?.
-
#report_opts ⇒ Object
: Hash[Symbol, bool]?.
-
#skeleton ⇒ Object
: String.
-
#trace_opts ⇒ Object
: Hash[Symbol, bool]?.
-
#warnings ⇒ Object
: bool.
-
#y ⇒ Object
: IO.
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize ⇒ Options
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
#debug ⇒ Object
: bool
19 20 21 |
# File 'lib/lrama/options.rb', line 19 def debug @debug end |
#define ⇒ Object
: Hash[String, String]
20 21 22 |
# File 'lib/lrama/options.rb', line 20 def define @define end |
#diagram ⇒ Object
: bool
21 22 23 |
# File 'lib/lrama/options.rb', line 21 def diagram @diagram end |
#diagram_file ⇒ Object
: String
22 23 24 |
# File 'lib/lrama/options.rb', line 22 def diagram_file @diagram_file end |
#error_recovery ⇒ Object
: bool
13 14 15 |
# File 'lib/lrama/options.rb', line 13 def error_recovery @error_recovery end |
#grammar_file ⇒ Object
: String
14 15 16 |
# File 'lib/lrama/options.rb', line 14 def grammar_file @grammar_file end |
#header ⇒ Object
: bool
9 10 11 |
# File 'lib/lrama/options.rb', line 9 def header @header end |
#header_file ⇒ Object
: String?
10 11 12 |
# File 'lib/lrama/options.rb', line 10 def header_file @header_file end |
#locations ⇒ Object
: bool
8 9 10 |
# File 'lib/lrama/options.rb', line 8 def locations @locations end |
#outfile ⇒ Object
: String
12 13 14 |
# File 'lib/lrama/options.rb', line 12 def outfile @outfile end |
#profile_opts ⇒ Object
: Hash[Symbol, bool]?
23 24 25 |
# File 'lib/lrama/options.rb', line 23 def profile_opts @profile_opts end |
#report_file ⇒ Object
: String?
11 12 13 |
# File 'lib/lrama/options.rb', line 11 def report_file @report_file end |
#report_opts ⇒ Object
: Hash[Symbol, bool]?
16 17 18 |
# File 'lib/lrama/options.rb', line 16 def report_opts @report_opts end |
#skeleton ⇒ Object
: String
7 8 9 |
# File 'lib/lrama/options.rb', line 7 def skeleton @skeleton end |
#trace_opts ⇒ Object
: Hash[Symbol, bool]?
15 16 17 |
# File 'lib/lrama/options.rb', line 15 def trace_opts @trace_opts end |
#warnings ⇒ Object
: bool
17 18 19 |
# File 'lib/lrama/options.rb', line 17 def warnings @warnings end |
#y ⇒ Object
: IO
18 19 20 |
# File 'lib/lrama/options.rb', line 18 def y @y end |