Class: Sexpir::Compiler
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #close ⇒ Object
- #compile(sexpfile) ⇒ Object
- #header ⇒ Object
-
#initialize ⇒ Compiler
constructor
A new instance of Compiler.
Methods included from Log
#indent, #log, #log_dbg, #step
Constructor Details
#initialize ⇒ Compiler
Returns a new instance of Compiler.
18 19 |
# File 'lib/sexpir/compiler.rb', line 18 def initialize end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
16 17 18 |
# File 'lib/sexpir/compiler.rb', line 16 def @options end |
Instance Method Details
#close ⇒ Object
34 35 36 |
# File 'lib/sexpir/compiler.rb', line 34 def close log "[+] closing : log is #{$log.inspect}" end |
#compile(sexpfile) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/sexpir/compiler.rb', line 26 def compile sexpfile header circuit=Parser.new.parse(sexpfile) Printer.new.print(circuit) Checker.new.check(circuit) RubyRTLGenerator.new.generate(circuit) end |
#header ⇒ Object
21 22 23 24 |
# File 'lib/sexpir/compiler.rb', line 21 def header log "Sexpir compiler - version #{VERSION}" #log "author : [email protected]" end |