Skip to content
This repository
Browse code

initial commit of the mystery language

  • Loading branch information...
commit 8e9d637985d2dc9b44922076ad54ffef7fa8e9c2 0 parents
Jeremy Ashkenas authored December 13, 2009
30  SYNTAX
... ...
@@ -0,0 +1,30 @@
  1
+Every line is an expression. Multiple expressions on a single line can be
  2
+separated by a ";" character.
  3
+
  4
+NUM:      1
  5
+          1.0
  6
+          
  7
+STRING:   "hello"
  8
+          'hello'
  9
+          
  10
+OBJECT:   {one : 1, two : 2}
  11
+          
  12
+ARRAY:    [1, 2, 3]
  13
+          
  14
+CODE:     a, b => a * b.
  15
+          
  16
+IF:       return x if x > 1
  17
+            
  18
+          if (x > 1) return x
  19
+              
  20
+ASSIGN:   a : b
  21
+              
  22
+LOGICAL:  x && y
  23
+          x and y
  24
+          x || y
  25
+          x or y
  26
+
  27
+
  28
+
  29
+          
  30
+
40  code.jaa
... ...
@@ -0,0 +1,40 @@
  1
+# I'm a comment and I'm ok.
  2
+# Return
  3
+# Case
  4
+
  5
+square: x => x * x.
  6
+
  7
+sum: x, y => x + y.
  8
+
  9
+odd: x => x % 2 is 0.
  10
+
  11
+even: x => x % 2 aint 0.
  12
+
  13
+object_literal: {one: 1, two: 2, three: 3}
  14
+
  15
+multiline_object: {
  16
+  pi: 3.14159
  17
+  list: [1, 2, 3, 4]
  18
+  three: 3
  19
+  inner_obj: {
  20
+    freedom: => _.freedom().
  21
+  }
  22
+}
  23
+
  24
+run_loop: =>
  25
+  fire_events(e => e.stopPropagation().)
  26
+  listen()
  27
+  wait().
  28
+
  29
+if submarine.shields_up
  30
+  full_speed_ahead()
  31
+  weapons.fire_torpedos()
  32
+else
  33
+  run_away().
  34
+
  35
+eldest: if 25 > 21 then liz else marge.
  36
+
  37
+
  38
+
  39
+
  40
+
76  documents.jaa
... ...
@@ -0,0 +1,76 @@
  1
+# Document Model
  2
+dc.model.Document: dc.Model.extend({
  3
+
  4
+  constructor : attributes => this.base(attributes).
  5
+
  6
+  # For display, show either the highlighted search results, or the summary,
  7
+  # if no highlights are available.
  8
+  # The import process will take care of this in the future, but the inline
  9
+  # version of the summary has all runs of whitespace squeezed out.
  10
+  displaySummary : =>
  11
+    text: this.get('highlight') or this.get('summary')
  12
+    text ? text.replace(/\s+/g, ' ') else ''
  13
+
  14
+  # Return a list of the document's metadata. Think about caching this on the
  15
+  # document by binding to Metadata, instead of on-the-fly.
  16
+  metadata : =>
  17
+    docId : this.id
  18
+    _.select(Metadata.models(), (m =>
  19
+      _.any(m.get('instances'), (i =>
  20
+        i.document_id == docId
  21
+      ))
  22
+    ))
  23
+
  24
+  bookmark : pageNumber =>
  25
+    bookmark : new dc.model.Bookmark({title : this.get('title'), page_number : pageNumber, document_id : this.id})
  26
+    Bookmarks.create(bookmark)
  27
+
  28
+  # Inspect.
  29
+  toString : =>
  30
+    'Document ' + this.id + ' "' + this.get('title') + '"'
  31
+
  32
+})
  33
+
  34
+# Document Set
  35
+dc.model.DocumentSet : dc.model.RESTfulSet.extend({
  36
+
  37
+  resource : 'documents'
  38
+
  39
+  SELECTION_CHANGED : 'documents:selection_changed'
  40
+
  41
+  constructor : options =>
  42
+    this.base(options)
  43
+    _.bindAll(this, 'downloadSelectedViewers', 'downloadSelectedPDF', 'downloadSelectedFullText')
  44
+
  45
+  selected      : => _.select(this.models(), m => m.get('selected'))
  46
+
  47
+  selectedIds   : => _.pluck(this.selected(), 'id')
  48
+
  49
+  countSelected : => this.selected().length
  50
+
  51
+  downloadSelectedViewers : =>
  52
+    dc.app.download('/download/' + this.selectedIds().join('/') + '/document_viewer.zip');
  53
+
  54
+  downloadSelectedPDF : =>
  55
+    return window.open(this.selected()[0].get('pdf_url')) if this.countSelected() <= 1
  56
+    dc.app.download('/download/' + this.selectedIds().join('/') + '/document_pdfs.zip')
  57
+
  58
+  downloadSelectedFullText : =>
  59
+    return window.open(this.selected()[0].get('full_text_url')) if this.countSelected() <= 1
  60
+    dc.app.download('/download/' + this.selectedIds().join('/') + '/document_text.zip')
  61
+
  62
+  # We override "_onModelEvent" to fire selection changed events when documents
  63
+  # change their selected state.
  64
+  _onModelEvent : e, model =>
  65
+    this.base(e, model)
  66
+    fire : (e == dc.Model.CHANGED and model.hasChanged('selected'))
  67
+    _.defer(_(this.fire).bind(this, this.SELECTION_CHANGED, this)) if fire
  68
+  }
  69
+
  70
+})
  71
+
  72
+# The main set of Documents, used by the search tab.
  73
+window.Documents : new dc.model.DocumentSet()
  74
+
  75
+# The set of documents that is used to look at a particular label.
  76
+dc.app.LabeledDocuments : new dc.model.DocumentSet()
206  grammar.y
... ...
@@ -0,0 +1,206 @@
  1
+class Parser
  2
+
  3
+# Declare tokens produced by the lexer
  4
+token IF ELSE THEN
  5
+token NEWLINE
  6
+token NUMBER
  7
+token STRING
  8
+token TRUE FALSE NULL
  9
+token IDENTIFIER PROPERTY_ACCESS
  10
+token CODE
  11
+
  12
+prechigh
  13
+  nonassoc UMINUS NOT '!'
  14
+  left     '*' '/' '%'
  15
+  left     '+' '-'
  16
+  left     '<=' '<' '>' '>='
  17
+  right    '==' '!=' IS AINT
  18
+  left     '&&' '||' AND OR
  19
+  right    '-=' '+=' '/=' '*='
  20
+preclow
  21
+
  22
+rule
  23
+  # All rules are declared in this format:
  24
+  #
  25
+  #   RuleName:
  26
+  #     OtherRule TOKEN AnotherRule    { code to run when this matches }
  27
+  #   | OtherRule                      { ... }
  28
+  #   ;
  29
+  #
  30
+  # In the code section (inside the {...} on the right):
  31
+  # - Assign to "result" the value returned by the rule.
  32
+  # - Use val[index of expression] to reference expressions on the left.
  33
+
  34
+
  35
+  # All parsing will end in this rule, being the trunk of the AST.
  36
+  Root:
  37
+    /* nothing */                      { result = Nodes.new([]) }
  38
+  | Expressions                        { result = val[0] }
  39
+  ;
  40
+
  41
+  # Any list of expressions or method body, seperated by line breaks.
  42
+  Expressions:
  43
+    Expression                         { result = Nodes.new(val) }
  44
+  | Expressions Terminator Expression  { result = val[0] << val[2] }
  45
+  | Expressions Terminator             { result = Nodes.new([val[0]]) }
  46
+  | Terminator Expressions             { result = Nodes.new([val[1]]) }
  47
+  ;
  48
+
  49
+  # All types of expressions in our language
  50
+  Expression:
  51
+    Literal
  52
+  | Variable
  53
+  | Call
  54
+  | Assign
  55
+  | Object
  56
+  | Code
  57
+  | Operation
  58
+  | Array
  59
+  | If
  60
+  ;
  61
+
  62
+  # All tokens that can terminate an expression
  63
+  Terminator:
  64
+    "\n"
  65
+  | ";"
  66
+  ;
  67
+
  68
+  # All hard-coded values
  69
+  Literal:
  70
+    NUMBER                        { result = LiteralNode.new(val[0]) }
  71
+  | STRING                        { result = LiteralNode.new(val[0]) }
  72
+  | TRUE                          { result = LiteralNode.new(true) }
  73
+  | FALSE                         { result = LiteralNode.new(false) }
  74
+  | NULL                          { result = LiteralNode.new(nil) }
  75
+  ;
  76
+
  77
+  # Assign to a variable
  78
+  Assign:
  79
+    Variable ":" Expression       { result = AssignNode.new(val[0], val[2]) }
  80
+  ;
  81
+
  82
+  # Assignment within an object literal.
  83
+  AssignObj:
  84
+    IDENTIFIER ":" Expression     { result = AssignNode.new(val[0], val[2], :object) }
  85
+  ;
  86
+
  87
+  # Arithmetic and logical operators
  88
+  # For Ruby's Operator precedence, see:
  89
+  # https://www.cs.auckland.ac.nz/references/ruby/ProgrammingRuby/language.html
  90
+  Operation:
  91
+    '!' Expression              { result = OpNode.new(val[0], val[1]) }
  92
+  | '-' Expression = UMINUS     { result = OpNode.new(val[0], val[1]) }
  93
+  | NOT Expression              { result = OpNode.new(val[0], val[1]) }
  94
+
  95
+
  96
+  | Expression '*' Expression   { result = OpNode.new(val[1], val[0], val[2]) }
  97
+  | Expression '/' Expression   { result = OpNode.new(val[1], val[0], val[2]) }
  98
+  | Expression '%' Expression   { result = OpNode.new(val[1], val[0], val[2]) }
  99
+
  100
+  | Expression '+' Expression   { result = OpNode.new(val[1], val[0], val[2]) }
  101
+  | Expression '-' Expression   { result = OpNode.new(val[1], val[0], val[2]) }
  102
+
  103
+  | Expression '<=' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  104
+  | Expression '<' Expression   { result = OpNode.new(val[1], val[0], val[2]) }
  105
+  | Expression '>' Expression   { result = OpNode.new(val[1], val[0], val[2]) }
  106
+  | Expression '>=' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  107
+
  108
+  | Expression '==' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  109
+  | Expression '!=' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  110
+  | Expression IS Expression    { result = OpNode.new(val[1], val[0], val[2]) }
  111
+  | Expression AINT Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  112
+
  113
+  | Expression '&&' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  114
+  | Expression '||' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  115
+  | Expression AND Expression   { result = OpNode.new(val[1], val[0], val[2]) }
  116
+  | Expression OR Expression    { result = OpNode.new(val[1], val[0], val[2]) }
  117
+
  118
+  # Add ternary?
  119
+
  120
+  | Expression '-=' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  121
+  | Expression '+=' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  122
+  | Expression '/=' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  123
+  | Expression '*=' Expression  { result = OpNode.new(val[1], val[0], val[2]) }
  124
+  # Add ||= &&=
  125
+  ;
  126
+
  127
+
  128
+  # Method definition
  129
+  Code:
  130
+    "=>" Expressions "."     { result = CodeNode.new([], val[1]) }
  131
+  | ParamList
  132
+      "=>" Expressions "."   { result = CodeNode.new(val[0], val[2]) }
  133
+  ;
  134
+
  135
+  ParamList:
  136
+    /* nothing */                 { result = [] }
  137
+  | IDENTIFIER                    { result = val }
  138
+  | ParamList "," IDENTIFIER      { result = val[0] << val[2] }
  139
+  ;
  140
+
  141
+  Variable:
  142
+    IDENTIFIER                              { result = VariableNode.new(val) }
  143
+  | Variable PROPERTY_ACCESS IDENTIFIER     { result = val[0] << val[2] }
  144
+  ;
  145
+
  146
+  Object:
  147
+    "{" "}"                       { result = ObjectNode.new([]) }
  148
+  | "{" AssignList "}"            { result = ObjectNode.new(val[1]) }
  149
+  | "{" Terminator AssignList
  150
+        Terminator "}"            { result = ObjectNode.new(val[2]) }
  151
+  ;
  152
+
  153
+  AssignList:
  154
+    /* nothing */                     { result = []}
  155
+  | AssignObj                         { result = val }
  156
+  | AssignList "," AssignObj          { result = val[0] << val[2] }
  157
+  | AssignList Terminator AssignObj   { result = val[0] << val[2] }
  158
+  ;
  159
+
  160
+  # A method call.
  161
+  Call:
  162
+    Variable "(" ArgList ")"          { result = CallNode.new(val[0], val[2]) }
  163
+  ;
  164
+
  165
+  # An Array.
  166
+  Array:
  167
+    "[" ArgList "]"                   { result = ArrayNode.new(val[1]) }
  168
+  ;
  169
+
  170
+  # A list of arguments to a method call.
  171
+  ArgList:
  172
+    /* nothing */                 { result = [] }
  173
+  | Expression                    { result = val }
  174
+  | ArgList "," Expression        { result = val[0] << val[2] }
  175
+  ;
  176
+
  177
+  If:
  178
+    IF Expression
  179
+       THEN Expression "."              { result = TernaryNode.new(val[1], val[3]) }
  180
+  | IF Expression Terminator
  181
+       Expressions "."                  { result = IfNode.new(val[1], val[3]) }
  182
+  | IF Expression
  183
+       THEN Expression
  184
+       ELSE Expression "."              { result = TernaryNode.new(val[1], val[3], val[5]) }
  185
+  | IF Expression Terminator
  186
+       Expressions Terminator
  187
+       ELSE Expressions "."             { result = IfNode.new(val[1], val[3], val[6]) }
  188
+  ;
  189
+
  190
+end
  191
+
  192
+---- header
  193
+  require "lexer"
  194
+  require "nodes"
  195
+
  196
+---- inner
  197
+  def parse(code, show_tokens=false)
  198
+    # @yydebug = true
  199
+    @tokens = Lexer.new.tokenize(code)
  200
+    puts @tokens.inspect if show_tokens
  201
+    do_parse
  202
+  end
  203
+
  204
+  def next_token
  205
+    @tokens.shift
  206
+  end
90  lexer.rb
... ...
@@ -0,0 +1,90 @@
  1
+class Lexer
  2
+
  3
+  KEYWORDS   = ["if", "else", "then",
  4
+                "true", "false", "null",
  5
+                "and", "or", "is", "aint", "not"]
  6
+
  7
+  IDENTIFIER = /\A([a-zA-Z$_]\w*)/
  8
+  NUMBER     = /\A([0-9]+(\.[0-9]+)?)/
  9
+  STRING     = /\A["'](.*?)["']/
  10
+  OPERATOR   = /\A([+\*&|\/\-%=<>]+)/
  11
+  WHITESPACE = /\A([ \t\r]+)/
  12
+  NEWLINE    = /\A([\r\n]+)/
  13
+  COMMENT    = /\A(#[^\r\n]*)/
  14
+  CODE       = /\A(=>)/
  15
+
  16
+  # This is how to implement a very simple scanner.
  17
+  # Scan one caracter at the time until you find something to parse.
  18
+  def tokenize(code)
  19
+    @code = code.chomp    # Cleanup code by remove extra line breaks
  20
+    @i = 0                # Current character position we're parsing
  21
+    @tokens = []          # Collection of all parsed tokens in the form [:TOKEN_TYPE, value]
  22
+    while @i < @code.length
  23
+      @chunk = @code[@i..-1]
  24
+      extract_next_token
  25
+    end
  26
+    @tokens
  27
+  end
  28
+
  29
+  def extract_next_token
  30
+    return if identifier_token
  31
+    return if number_token
  32
+    return if string_token
  33
+    return if remove_comment
  34
+    return if whitespace_token
  35
+    return    literal_token
  36
+  end
  37
+
  38
+  # Matching if, print, method names, etc.
  39
+  def identifier_token
  40
+    return false unless identifier = @chunk[IDENTIFIER, 1]
  41
+    # Keywords are special identifiers tagged with their own name, 'if' will result
  42
+    # in an [:IF, "if"] token
  43
+    tag = KEYWORDS.include?(identifier) ? identifier.upcase.to_sym : :IDENTIFIER
  44
+    if tag == :IDENTIFIER && @tokens[-1] && @tokens[-1][1] == '.'
  45
+      @tokens[-1] = [:PROPERTY_ACCESS, '.']
  46
+    end
  47
+    @tokens << [tag, identifier]
  48
+    @i += identifier.length
  49
+  end
  50
+
  51
+  def number_token
  52
+    return false unless number = @chunk[NUMBER, 1]
  53
+    float = number.include?('.')
  54
+    @tokens << [:NUMBER, float ? number.to_f : number.to_i]
  55
+    @i += number.length
  56
+  end
  57
+
  58
+  def string_token
  59
+    return false unless string = @chunk[STRING, 1]
  60
+    @tokens << [:STRING, string]
  61
+    @i += string.length + 2
  62
+  end
  63
+
  64
+  def remove_comment
  65
+    return false unless comment = @chunk[COMMENT, 1]
  66
+    @i += comment.length
  67
+  end
  68
+
  69
+  # Ignore whitespace
  70
+  def whitespace_token
  71
+    return false unless whitespace = @chunk[WHITESPACE, 1]
  72
+    @i += whitespace.length
  73
+  end
  74
+
  75
+  # We treat all other single characters as a token. Eg.: ( ) , . !
  76
+  # Multi-character operators are also literal tokens, so that Racc can assign
  77
+  # the proper order of operations. Multiple newlines get merged.
  78
+  def literal_token
  79
+    value = @chunk[NEWLINE, 1]
  80
+    if value
  81
+      @tokens << ["\n", "\n"] unless @tokens.last && @tokens.last[0] == "\n"
  82
+      return @i += value.length
  83
+    end
  84
+    value = @chunk[OPERATOR, 1]
  85
+    value ||= @chunk[0,1]
  86
+    @tokens << [value, value]
  87
+    @i += value.length
  88
+  end
  89
+
  90
+end
2  lexer_test.rb
... ...
@@ -0,0 +1,2 @@
  1
+require "lexer"
  2
+p Lexer.new.tokenize(File.read('code.jaa'))
176  nodes.rb
... ...
@@ -0,0 +1,176 @@
  1
+# Tabs are two spaces for pretty-printing.
  2
+TAB = '  '
  3
+
  4
+# Collection of nodes each one representing an expression.
  5
+class Nodes
  6
+  attr_reader :nodes
  7
+  def initialize(nodes)
  8
+    @nodes = nodes
  9
+  end
  10
+
  11
+  def <<(node)
  12
+    @nodes << node
  13
+    self
  14
+  end
  15
+
  16
+  # Flatten redundant nested node lists until we have multiple nodes on the
  17
+  # same level to work with.
  18
+  def reduce
  19
+    return nodes.first.reduce if nodes.length == 1 && nodes.first.is_a?(Nodes)
  20
+    nodes
  21
+  end
  22
+
  23
+  def compile(indent='')
  24
+    reduce.map { |node|
  25
+      indent + node.compile(indent) + (node.is_a?(IfNode) ? '' : ';')
  26
+    }.join("\n")
  27
+  end
  28
+end
  29
+
  30
+# Literals are static values that have a Ruby representation, eg.: a string, a number,
  31
+# true, false, nil, etc.
  32
+class LiteralNode
  33
+  def initialize(value)
  34
+    @value = value
  35
+  end
  36
+
  37
+  def compile(indent)
  38
+    @value.to_s
  39
+  end
  40
+end
  41
+
  42
+# Node of a method call or local variable access, can take any of these forms:
  43
+#
  44
+#   method # this form can also be a local variable
  45
+#   method(argument1, argument2)
  46
+#   receiver.method
  47
+#   receiver.method(argument1, argument2)
  48
+#
  49
+class CallNode
  50
+  def initialize(variable, arguments=[])
  51
+    @variable, @arguments = variable, arguments
  52
+  end
  53
+
  54
+  def compile(indent)
  55
+    args = @arguments.map{|a| a.compile(indent) }.join(', ')
  56
+    "#{@variable.compile(indent)}(#{args})"
  57
+  end
  58
+end
  59
+
  60
+class VariableNode
  61
+  def initialize(name)
  62
+    @name = name
  63
+    @properties = []
  64
+  end
  65
+
  66
+  def <<(other)
  67
+    @properties << other
  68
+    self
  69
+  end
  70
+
  71
+  def compile(indent)
  72
+    [@name, @properties].flatten.join('.')
  73
+  end
  74
+end
  75
+
  76
+# Setting the value of a local variable.
  77
+class AssignNode
  78
+  def initialize(variable, value, context=nil)
  79
+    @variable, @value, @context = variable, value, context
  80
+  end
  81
+
  82
+  def compile(indent)
  83
+    return "#{@variable}: #{@value.compile(indent + TAB)}" if @context == :object
  84
+    "var #{@variable.compile(indent)} = #{@value.compile(indent)}"
  85
+  end
  86
+end
  87
+
  88
+# Simple Arithmetic and logical operations
  89
+class OpNode
  90
+  CONVERSIONS = {
  91
+    "=="    => "===",
  92
+    "!="    => "!==",
  93
+    'and'   => '&&',
  94
+    'or'    => '||',
  95
+    'is'    => '===',
  96
+    "aint"  => "!==",
  97
+    'not'   => '!',
  98
+  }
  99
+
  100
+  def initialize(operator, first, second=nil)
  101
+    @first, @second = first, second
  102
+    @operator = CONVERSIONS[operator] || operator
  103
+  end
  104
+
  105
+  def unary?
  106
+    @second.nil?
  107
+  end
  108
+
  109
+  def compile(indent)
  110
+    "(#{@first.compile(indent)} #{@operator} #{@second.compile(indent)})"
  111
+  end
  112
+end
  113
+
  114
+# Method definition.
  115
+class CodeNode
  116
+  def initialize(params, body)
  117
+    @params = params
  118
+    @body = body
  119
+  end
  120
+
  121
+  def compile(indent)
  122
+    nodes = @body.reduce
  123
+    exprs = nodes.map {|n| n.compile(indent + TAB) }
  124
+    exprs[-1] = "return #{exprs[-1]};"
  125
+    exprs = exprs.map {|e| indent + TAB + e }
  126
+    "function(#{@params.join(', ')}) {\n#{exprs.join(";\n")}\n#{indent}}"
  127
+  end
  128
+end
  129
+
  130
+class ObjectNode
  131
+  def initialize(properties = [])
  132
+    @properties = properties
  133
+  end
  134
+
  135
+  def compile(indent)
  136
+    props = @properties.map {|p| indent + TAB + p.compile(indent) }.join(",\n")
  137
+    "{\n#{props}\n#{indent}}"
  138
+  end
  139
+end
  140
+
  141
+class ArrayNode
  142
+  def initialize(objects=[])
  143
+    @objects = objects
  144
+  end
  145
+
  146
+  def compile(indent)
  147
+    objects = @objects.map {|o| o.compile(indent) }.join(', ')
  148
+    "[#{objects}]"
  149
+  end
  150
+end
  151
+
  152
+# "if-else" control structure. Look at this node if you want to implement other control
  153
+# structures like while, for, loop, etc.
  154
+class IfNode
  155
+  def initialize(condition, body, else_body=nil)
  156
+    @condition, @body, @else_body = condition, body, else_body
  157
+  end
  158
+
  159
+  def compile(indent)
  160
+    if_part   = "if (#{@condition.compile(indent)}) {\n#{@body.compile(indent + TAB)}\n#{indent}}"
  161
+    else_part = @else_body ? " else {\n#{@else_body.compile(indent + TAB)}\n#{indent}}" : ''
  162
+    if_part + else_part
  163
+  end
  164
+end
  165
+
  166
+class TernaryNode
  167
+  def initialize(condition, body, else_body=nil)
  168
+    @condition, @body, @else_body = condition, body, else_body
  169
+  end
  170
+
  171
+  def compile(indent)
  172
+    if_part   = "#{@condition.compile(indent)} ? #{@body.compile(indent)}"
  173
+    else_part = @else_body ? "#{@else_body.compile(indent)}" : 'null'
  174
+    "#{if_part} : #{else_part}"
  175
+  end
  176
+end
1,090  parser.rb
... ...
@@ -0,0 +1,1090 @@
  1
+#
  2
+# DO NOT MODIFY!!!!
  3
+# This file is automatically generated by Racc 1.4.6
  4
+# from Racc grammer file "".
  5
+#
  6
+
  7
+require 'racc/parser.rb'
  8
+
  9
+  require "lexer"
  10
+  require "nodes"
  11
+
  12
+class Parser < Racc::Parser
  13
+
  14
+module_eval(<<'...end grammar.y/module_eval...', 'grammar.y', 197)
  15
+  def parse(code, show_tokens=false)
  16
+    # @yydebug = true
  17
+    @tokens = Lexer.new.tokenize(code)
  18
+    puts @tokens.inspect if show_tokens
  19
+    do_parse
  20
+  end
  21
+
  22
+  def next_token
  23
+    @tokens.shift
  24
+  end
  25
+...end grammar.y/module_eval...
  26
+##### State transition tables begin ###
  27
+
  28
+racc_action_table = [
  29
+     5,    83,    31,    35,    14,    17,    21,    24,    28,     2,
  30
+    12,    15,    82,     9,    11,    73,     5,    31,    81,    27,
  31
+    14,    17,    21,    24,    28,     2,    74,    12,    15,     9,
  32
+    11,    37,    73,    31,    71,    27,   118,    36,   -52,    20,
  33
+   -52,    67,     1,    68,    12,    15,     8,   -65,    82,    12,
  34
+    15,    32,   113,    84,    31,    20,    12,    15,     1,     5,
  35
+   127,   -65,     8,    14,    17,    21,    24,    28,     2,    76,
  36
+    12,    15,     9,    11,   121,     5,    12,    15,    27,    14,
  37
+    17,    21,    24,    28,     2,    43,    12,    15,     9,    11,
  38
+   117,    58,    60,    62,    27,    12,    15,    31,    20,    12,
  39
+    15,     1,    58,    60,    62,     8,    58,    60,    62,    64,
  40
+    66,   108,   nil,   nil,    20,   nil,   nil,     1,     5,   nil,
  41
+   nil,     8,    14,    17,    21,    24,    28,     2,   nil,   nil,
  42
+   nil,     9,    11,   nil,     5,   nil,   nil,    27,    14,    17,
  43
+    21,    24,    28,     2,   nil,   nil,   nil,     9,    11,   nil,
  44
+   nil,   nil,   nil,    27,   nil,   nil,   nil,    20,   nil,   nil,
  45
+     1,   nil,   nil,   nil,     8,    58,    60,    62,    64,    66,
  46
+    12,    15,   nil,    20,   nil,   -51,     1,     5,   nil,   nil,
  47
+     8,    14,    17,    21,    24,    28,     2,   nil,   nil,   nil,
  48
+     9,    11,   nil,     5,   nil,   nil,    27,    14,    17,    21,
  49
+    24,    28,     2,   nil,   nil,   nil,     9,    11,   nil,   nil,
  50
+   nil,   nil,    27,   nil,   nil,   nil,    20,   nil,   nil,     1,
  51
+   nil,   nil,   nil,     8,    58,    60,    62,    64,    66,   nil,
  52
+   nil,   nil,    20,   nil,   nil,     1,     5,   nil,   nil,     8,
  53
+    14,    17,    21,    24,    28,     2,   nil,   nil,   nil,     9,
  54
+    11,   nil,     5,   nil,   nil,    27,    14,    17,    21,    24,
  55
+    28,     2,   nil,   nil,   nil,     9,    11,   nil,   nil,   nil,
  56
+   nil,    27,    12,    15,   nil,    20,   nil,   nil,     1,   nil,
  57
+   nil,   nil,     8,    58,    60,    62,    64,    66,    12,    15,
  58
+   nil,    20,   nil,   nil,     1,     5,   124,   nil,     8,    14,
  59
+    17,    21,    24,    28,     2,   nil,   nil,   nil,     9,    11,
  60
+   nil,     5,   nil,   nil,    27,    14,    17,    21,    24,    28,
  61
+     2,   nil,   nil,   nil,     9,    11,   nil,   nil,   nil,   nil,
  62
+    27,   nil,   nil,   nil,    20,   nil,   -51,     1,   nil,   nil,
  63
+   nil,     8,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  64
+    20,   nil,   nil,     1,     5,   nil,   nil,     8,    14,    17,
  65
+    21,    24,    28,     2,   nil,   nil,   nil,     9,    11,   nil,
  66
+     5,   nil,   nil,    27,    14,    17,    21,    24,    28,     2,
  67
+   nil,   nil,   nil,     9,    11,   nil,   nil,   nil,   nil,    27,
  68
+   nil,   nil,   nil,    20,   nil,   nil,     1,   nil,   nil,   nil,
  69
+     8,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    20,
  70
+   nil,   nil,     1,     5,   nil,   nil,     8,    14,    17,    21,
  71
+    24,    28,     2,   nil,   nil,   nil,     9,    11,   nil,     5,
  72
+   nil,   nil,    27,    14,    17,    21,    24,    28,     2,   nil,
  73
+   nil,   nil,     9,    11,   nil,   nil,   nil,   nil,    27,    12,
  74
+    15,   nil,    20,   nil,   nil,     1,   nil,   nil,   nil,     8,
  75
+   nil,   nil,   nil,   nil,   nil,    12,    15,   nil,    20,   nil,
  76
+   nil,     1,     5,   nil,   nil,     8,    14,    17,    21,    24,
  77
+    28,     2,   nil,   nil,   nil,     9,    11,   nil,     5,   nil,
  78
+   nil,    27,    14,    17,    21,    24,    28,     2,   nil,   nil,
  79
+   nil,     9,    11,   nil,   nil,   nil,   nil,    27,   nil,   nil,
  80
+   nil,    20,   nil,   nil,     1,   nil,   nil,   nil,     8,   nil,
  81
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,    20,   nil,   nil,
  82
+     1,     5,   nil,   nil,     8,    14,    17,    21,    24,    28,
  83
+     2,   nil,   nil,   nil,     9,    11,   nil,     5,   nil,   nil,
  84
+    27,    14,    17,    21,    24,    28,     2,   nil,   nil,   nil,
  85
+     9,    11,   nil,   nil,   nil,   nil,    27,   nil,   nil,   nil,
  86
+    20,   nil,   nil,     1,   nil,   nil,   nil,     8,   nil,   nil,
  87
+   nil,   nil,   nil,   nil,   nil,   nil,    20,   nil,   nil,     1,
  88
+     5,   nil,   nil,     8,    14,    17,    21,    24,    28,     2,
  89
+   nil,   nil,   nil,     9,    11,   nil,     5,   nil,   nil,    27,
  90
+    14,    17,    21,    24,    28,     2,   nil,   nil,   nil,     9,
  91
+    11,   nil,   nil,   nil,   nil,    27,   nil,   nil,   nil,    20,
  92
+   nil,   nil,     1,   nil,   nil,   nil,     8,   nil,   nil,   nil,
  93
+   nil,   nil,   nil,   nil,   nil,    20,   nil,   nil,     1,     5,
  94
+   nil,   nil,     8,    14,    17,    21,    24,    28,     2,   nil,
  95
+   nil,   nil,     9,    11,   nil,     5,   nil,   nil,    27,    14,
  96
+    17,    21,    24,    28,     2,   nil,   nil,   nil,     9,    11,
  97
+   nil,   nil,   nil,   nil,    27,   nil,   nil,   nil,    20,   nil,
  98
+   nil,     1,   nil,   nil,   nil,     8,   nil,   nil,   nil,   nil,
  99
+   nil,   nil,   nil,   nil,    20,   nil,   nil,     1,     5,   nil,
  100
+   nil,     8,    14,    17,    21,    24,    28,     2,   nil,   nil,
  101
+   nil,     9,    11,   nil,     5,   nil,   nil,    27,    14,    17,
  102
+    21,    24,    28,     2,   nil,   nil,   nil,     9,    11,   nil,
  103
+   nil,   nil,   nil,    27,   nil,   nil,   nil,    20,   nil,   nil,
  104
+     1,   nil,   nil,   nil,     8,   nil,   nil,   nil,   nil,   nil,
  105
+   nil,   nil,   nil,    20,   nil,   nil,     1,     5,   nil,   nil,
  106
+     8,    14,    17,    21,    24,    28,     2,   nil,   nil,   nil,
  107
+     9,    11,   nil,     5,   nil,   nil,    27,    14,    17,    21,
  108
+    24,    28,     2,   nil,   nil,   nil,     9,    11,   nil,   nil,
  109
+   nil,   nil,    27,   nil,   nil,   nil,    20,   nil,   -51,     1,
  110
+   nil,   nil,   nil,     8,   nil,   nil,   nil,   nil,   nil,   nil,
  111
+   nil,   nil,    20,   nil,   nil,     1,     5,   nil,   nil,     8,
  112
+    14,    17,    21,    24,    28,     2,   nil,   nil,   nil,     9,
  113
+    11,   nil,     5,   nil,   nil,    27,    14,    17,    21,    24,
  114
+    28,     2,   nil,   nil,   nil,     9,    11,   nil,   nil,   nil,
  115
+   nil,    27,   nil,   nil,   nil,    20,   nil,   nil,     1,   nil,
  116
+   nil,   nil,     8,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  117
+   nil,    20,   nil,   nil,     1,     5,   nil,   nil,     8,    14,
  118
+    17,    21,    24,    28,     2,   nil,   nil,   nil,     9,    11,
  119
+   nil,     5,   nil,   nil,    27,    14,    17,    21,    24,    28,
  120
+     2,   nil,   nil,   nil,     9,    11,   nil,   nil,   nil,   nil,
  121
+    27,   nil,   nil,   nil,    20,   nil,   nil,     1,   nil,   nil,
  122
+   nil,     8,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  123
+    20,   nil,   nil,     1,     5,   nil,   nil,     8,    14,    17,
  124
+    21,    24,    28,     2,   nil,   nil,   nil,     9,    11,   nil,
  125
+     5,   nil,   nil,    27,    14,    17,    21,    24,    28,     2,
  126
+   nil,   nil,   nil,     9,    11,   nil,   nil,   nil,   nil,    27,
  127
+   nil,   nil,   nil,    20,   nil,   nil,     1,   nil,   nil,   nil,
  128
+     8,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    20,
  129
+   nil,   nil,     1,     5,   nil,   nil,     8,    14,    17,    21,
  130
+    24,    28,     2,   nil,   nil,   nil,     9,    11,   nil,     5,
  131
+   nil,   nil,    27,    14,    17,    21,    24,    28,     2,   nil,
  132
+   nil,   nil,     9,    11,   nil,   nil,   nil,   nil,    27,   nil,
  133
+   nil,   nil,    20,   nil,   nil,     1,   nil,   nil,   nil,     8,
  134
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    20,   nil,
  135
+   nil,     1,     5,   nil,   nil,     8,    14,    17,    21,    24,
  136
+    28,     2,   nil,   nil,   nil,     9,    11,   nil,     5,   nil,
  137
+   nil,    27,    14,    17,    21,    24,    28,     2,   nil,   nil,
  138
+   nil,     9,    11,   nil,   nil,   nil,   nil,    27,   nil,   nil,
  139
+   nil,    20,   nil,   nil,     1,   nil,   nil,   nil,     8,   nil,
  140
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,    20,   nil,   nil,
  141
+     1,     5,   nil,   nil,     8,    14,    17,    21,    24,    28,
  142
+     2,   nil,   nil,   nil,     9,    11,   nil,     5,   nil,   nil,
  143
+    27,    14,    17,    21,    24,    28,     2,   nil,   nil,   nil,
  144
+     9,    11,   nil,   nil,   nil,   nil,    27,   nil,   nil,   nil,
  145
+    20,   nil,   nil,     1,   nil,   nil,   nil,     8,   nil,   nil,
  146
+   119,   nil,   nil,   nil,   nil,   nil,    20,   nil,   nil,     1,
  147
+   nil,   nil,   nil,     8,    58,    60,    62,    64,    66,    47,
  148
+    49,    51,    53,    55,    56,    57,    59,    61,    63,    65,
  149
+    46,    48,    50,    52,    54,    79,   nil,   nil,   nil,   120,
  150
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    58,    60,
  151
+    62,    64,    66,    47,    49,    51,    53,    55,    56,    57,
  152
+    59,    61,    63,    65,    46,    48,    50,    52,    54,    12,
  153
+    15,    58,    60,    62,    64,    66,    47,    49,    51,    53,
  154
+    55,    56,    57,    59,    61,    63,    65,    46,    48,    50,
  155
+    52,    54,   nil,   nil,   nil,   nil,   125,    58,    60,    62,
  156
+    64,    66,    47,    49,    51,    53,    55,    56,    57,    59,
  157
+    61,    63,    65,    46,    48,    50,    52,    54,    58,    60,
  158
+    62,    64,    66,    47,    49,    51,    53,    55,    56,    57,
  159
+    59,    61,    63,    65,    46,    48,    50,    52,    54,    58,
  160
+    60,    62,    64,    66,    47,    49,    51,    53,    55,    56,
  161
+    57,    59,    61,    63,    65,    46,    48,    50,    52,    54,
  162
+    58,    60,    62,    64,    66,    47,    49,    51,    53,    55,
  163
+    56,    57,    59,    61,    63,    65,    46,    48,    50,    52,
  164
+    54,    58,    60,    62,    64,    66,    47,    49,    51,    53,
  165
+    55,    56,    57,    59,    61,    63,    65,    46,    48,    50,
  166
+    52,    54,    58,    60,    62,    64,    66,    47,    49,    51,
  167
+    53,    55,    56,    57,    59,    61,    63,    65,    46,    48,
  168
+    50,    52,    54,    58,    60,    62,    64,    66,    47,    49,
  169
+    51,    53,    55,    56,    57,    59,    61,    63,    65,    46,
  170
+    48,    50,    52,    54,    58,    60,    62,    64,    66,    47,
  171
+    49,    51,    53,    55,    56,    57,    59,    61,    63,    65,
  172
+    46,    48,    50,    52,    54,    58,    60,    62,    64,    66,
  173
+    47,    49,    51,    53,    55,    56,    57,    59,    61,    63,
  174
+    65,    46,    48,    50,    52,    54,    58,    60,    62,    64,
  175
+    66,    47,    49,    51,    53,    55,    56,    57,    59,    61,
  176
+    63,    65,    46,    48,    50,    52,    54,    58,    60,    62,
  177
+    64,    66,    47,    49,    51,    53,    55,    56,    57,    59,
  178
+    58,    60,    62,    64,    66,    47,    49,    51,    53,    55,
  179
+    56,    57,    59,    58,    60,    62,    64,    66,    47,    49,
  180
+    51,    53,    55,    56,    57,    59,    58,    60,    62,    64,
  181
+    66,    47,    49,    51,    53,    55,    56,    57,    59,    58,
  182
+    60,    62,    64,    66,    47,    49,    51,    53,    55,    56,
  183
+    57,    59,    58,    60,    62,    64,    66,    47,    49,    51,
  184
+    53,    55,    56,    57,    59,    58,    60,    62,    64,    66,
  185
+    47,    49,    51,    53,    55,    56,    57,    59,    58,    60,
  186
+    62,    64,    66,    47,    49,    51,    53,    55,    56,    57,
  187
+    59 ]
  188
+
  189
+racc_action_check = [
  190
+     8,    43,   112,     4,     8,     8,     8,     8,     8,     8,
  191
+    75,    75,    39,     8,     8,    75,    36,     1,    39,     8,
  192
+    36,    36,    36,    36,    36,    36,    31,    30,    30,    36,
  193
+    36,     4,    30,    73,    30,    36,   112,     4,     2,     8,
  194
+     2,    26,     8,    26,     1,     1,     8,     8,    77,    44,
  195
+    44,     1,    77,    44,    34,    36,   126,   126,    36,   124,
  196
+   126,    36,    36,   124,   124,   124,   124,   124,   124,    35,
  197
+   115,   115,   124,   124,   115,    74,    23,    23,   124,    74,
  198
+    74,    74,    74,    74,    74,    19,   107,   107,    74,    74,
  199
+   107,   104,   104,   104,    74,   124,   124,    72,   124,    70,
  200
+    70,   124,   106,   106,   106,   124,    93,    93,    93,    93,
  201
+    93,    68,   nil,   nil,    74,   nil,   nil,    74,     5,   nil,
  202
+   nil,    74,     5,     5,     5,     5,     5,     5,   nil,   nil,
  203
+   nil,     5,     5,   nil,     0,   nil,   nil,     5,     0,     0,
  204
+     0,     0,     0,     0,   nil,   nil,   nil,     0,     0,   nil,
  205
+   nil,   nil,   nil,     0,   nil,   nil,   nil,     5,   nil,   nil,
  206
+     5,   nil,   nil,   nil,     5,    91,    91,    91,    91,    91,
  207
+     0,     0,   nil,     0,   nil,     0,     0,     9,   nil,   nil,
  208
+     0,     9,     9,     9,     9,     9,     9,   nil,   nil,   nil,
  209
+     9,     9,   nil,    11,   nil,   nil,     9,    11,    11,    11,
  210
+    11,    11,    11,   nil,   nil,   nil,    11,    11,   nil,   nil,
  211
+   nil,   nil,    11,   nil,   nil,   nil,     9,   nil,   nil,     9,
  212
+   nil,   nil,   nil,     9,    89,    89,    89,    89,    89,   nil,
  213
+   nil,   nil,    11,   nil,   nil,    11,    80,   nil,   nil,    11,
  214
+    80,    80,    80,    80,    80,    80,   nil,   nil,   nil,    80,
  215
+    80,   nil,    20,   nil,   nil,    80,    20,    20,    20,    20,
  216
+    20,    20,   nil,   nil,   nil,    20,    20,   nil,   nil,   nil,
  217
+   nil,    20,    80,    80,   nil,    80,   nil,   nil,    80,   nil,
  218
+   nil,   nil,    80,    87,    87,    87,    87,    87,    20,    20,
  219
+   nil,    20,   nil,   nil,    20,   122,   122,   nil,    20,   122,
  220
+   122,   122,   122,   122,   122,   nil,   nil,   nil,   122,   122,
  221
+   nil,    82,   nil,   nil,   122,    82,    82,    82,    82,    82,
  222
+    82,   nil,   nil,   nil,    82,    82,   nil,   nil,   nil,   nil,
  223
+    82,   nil,   nil,   nil,   122,   nil,   122,   122,   nil,   nil,
  224
+   nil,   122,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  225
+    82,   nil,   nil,    82,   119,   nil,   nil,    82,   119,   119,
  226
+   119,   119,   119,   119,   nil,   nil,   nil,   119,   119,   nil,
  227
+    27,   nil,   nil,   119,    27,    27,    27,    27,    27,    27,
  228
+   nil,   nil,   nil,    27,    27,   nil,   nil,   nil,   nil,    27,
  229
+   nil,   nil,   nil,   119,   nil,   nil,   119,   nil,   nil,   nil,
  230
+   119,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    27,
  231
+   nil,   nil,    27,    29,   nil,   nil,    27,    29,    29,    29,
  232
+    29,    29,    29,   nil,   nil,   nil,    29,    29,   nil,    67,
  233
+   nil,   nil,    29,    67,    67,    67,    67,    67,    67,   nil,
  234
+   nil,   nil,    67,    67,   nil,   nil,   nil,   nil,    67,    29,
  235
+    29,   nil,    29,   nil,   nil,    29,   nil,   nil,   nil,    29,
  236
+   nil,   nil,   nil,   nil,   nil,    67,    67,   nil,    67,   nil,
  237
+   nil,    67,    66,   nil,   nil,    67,    66,    66,    66,    66,
  238
+    66,    66,   nil,   nil,   nil,    66,    66,   nil,    65,   nil,
  239
+   nil,    66,    65,    65,    65,    65,    65,    65,   nil,   nil,
  240
+   nil,    65,    65,   nil,   nil,   nil,   nil,    65,   nil,   nil,
  241
+   nil,    66,   nil,   nil,    66,   nil,   nil,   nil,    66,   nil,
  242
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,    65,   nil,   nil,
  243
+    65,    64,   nil,   nil,    65,    64,    64,    64,    64,    64,
  244
+    64,   nil,   nil,   nil,    64,    64,   nil,    79,   nil,   nil,
  245
+    64,    79,    79,    79,    79,    79,    79,   nil,   nil,   nil,
  246
+    79,    79,   nil,   nil,   nil,   nil,    79,   nil,   nil,   nil,
  247
+    64,   nil,   nil,    64,   nil,   nil,   nil,    64,   nil,   nil,
  248
+   nil,   nil,   nil,   nil,   nil,   nil,    79,   nil,   nil,    79,
  249
+    37,   nil,   nil,    79,    37,    37,    37,    37,    37,    37,
  250
+   nil,   nil,   nil,    37,    37,   nil,    63,   nil,   nil,    37,
  251
+    63,    63,    63,    63,    63,    63,   nil,   nil,   nil,    63,
  252
+    63,   nil,   nil,   nil,   nil,    63,   nil,   nil,   nil,    37,
  253
+   nil,   nil,    37,   nil,   nil,   nil,    37,   nil,   nil,   nil,
  254
+   nil,   nil,   nil,   nil,   nil,    63,   nil,   nil,    63,    62,
  255
+   nil,   nil,    63,    62,    62,    62,    62,    62,    62,   nil,
  256
+   nil,   nil,    62,    62,   nil,    61,   nil,   nil,    62,    61,
  257
+    61,    61,    61,    61,    61,   nil,   nil,   nil,    61,    61,
  258
+   nil,   nil,   nil,   nil,    61,   nil,   nil,   nil,    62,   nil,
  259
+   nil,    62,   nil,   nil,   nil,    62,   nil,   nil,   nil,   nil,
  260
+   nil,   nil,   nil,   nil,    61,   nil,   nil,    61,    60,   nil,
  261
+   nil,    61,    60,    60,    60,    60,    60,    60,   nil,   nil,
  262
+   nil,    60,    60,   nil,    59,   nil,   nil,    60,    59,    59,
  263
+    59,    59,    59,    59,   nil,   nil,   nil,    59,    59,   nil,
  264
+   nil,   nil,   nil,    59,   nil,   nil,   nil,    60,   nil,   nil,
  265
+    60,   nil,   nil,   nil,    60,   nil,   nil,   nil,   nil,   nil,
  266
+   nil,   nil,   nil,    59,   nil,   nil,    59,    45,   nil,   nil,
  267
+    59,    45,    45,    45,    45,    45,    45,   nil,   nil,   nil,
  268
+    45,    45,   nil,    58,   nil,   nil,    45,    58,    58,    58,
  269
+    58,    58,    58,   nil,   nil,   nil,    58,    58,   nil,   nil,
  270
+   nil,   nil,    58,   nil,   nil,   nil,    45,   nil,    45,    45,
  271
+   nil,   nil,   nil,    45,   nil,   nil,   nil,   nil,   nil,   nil,
  272
+   nil,   nil,    58,   nil,   nil,    58,    47,   nil,   nil,    58,
  273
+    47,    47,    47,    47,    47,    47,   nil,   nil,   nil,    47,
  274
+    47,   nil,    48,   nil,   nil,    47,    48,    48,    48,    48,
  275
+    48,    48,   nil,   nil,   nil,    48,    48,   nil,   nil,   nil,
  276
+   nil,    48,   nil,   nil,   nil,    47,   nil,   nil,    47,   nil,
  277
+   nil,   nil,    47,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  278
+   nil,    48,   nil,   nil,    48,    49,   nil,   nil,    48,    49,
  279
+    49,    49,    49,    49,    49,   nil,   nil,   nil,    49,    49,
  280
+   nil,    50,   nil,   nil,    49,    50,    50,    50,    50,    50,
  281
+    50,   nil,   nil,   nil,    50,    50,   nil,   nil,   nil,   nil,
  282
+    50,   nil,   nil,   nil,    49,   nil,   nil,    49,   nil,   nil,
  283
+   nil,    49,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  284
+    50,   nil,   nil,    50,    51,   nil,   nil,    50,    51,    51,
  285
+    51,    51,    51,    51,   nil,   nil,   nil,    51,    51,   nil,
  286
+    52,   nil,   nil,    51,    52,    52,    52,    52,    52,    52,
  287
+   nil,   nil,   nil,    52,    52,   nil,   nil,   nil,   nil,    52,
  288
+   nil,   nil,   nil,    51,   nil,   nil,    51,   nil,   nil,   nil,
  289
+    51,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    52,
  290
+   nil,   nil,    52,    53,   nil,   nil,    52,    53,    53,    53,
  291
+    53,    53,    53,   nil,   nil,   nil,    53,    53,   nil,    54,
  292
+   nil,   nil,    53,    54,    54,    54,    54,    54,    54,   nil,
  293
+   nil,   nil,    54,    54,   nil,   nil,   nil,   nil,    54,   nil,
  294
+   nil,   nil,    53,   nil,   nil,    53,   nil,   nil,   nil,    53,
  295
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    54,   nil,
  296
+   nil,    54,    55,   nil,   nil,    54,    55,    55,    55,    55,
  297
+    55,    55,   nil,   nil,   nil,    55,    55,   nil,    56,   nil,
  298
+   nil,    55,    56,    56,    56,    56,    56,    56,   nil,   nil,
  299
+   nil,    56,    56,   nil,   nil,   nil,   nil,    56,   nil,   nil,
  300
+   nil,    55,   nil,   nil,    55,   nil,   nil,   nil,    55,   nil,
  301
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,    56,   nil,   nil,
  302
+    56,    57,   nil,   nil,    56,    57,    57,    57,    57,    57,
  303
+    57,   nil,   nil,   nil,    57,    57,   nil,    46,   nil,   nil,
  304
+    57,    46,    46,    46,    46,    46,    46,   nil,   nil,   nil,
  305
+    46,    46,   nil,   nil,   nil,   nil,    46,   nil,   nil,   nil,
  306
+    57,   nil,   nil,    57,   nil,   nil,   nil,    57,   nil,   nil,
  307
+   114,   nil,   nil,   nil,   nil,   nil,    46,   nil,   nil,    46,
  308
+   nil,   nil,   nil,    46,   114,   114,   114,   114,   114,   114,
  309
+   114,   114,   114,   114,   114,   114,   114,   114,   114,   114,
  310
+   114,   114,   114,   114,   114,    38,   nil,   nil,   nil,   114,
  311
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    38,    38,
  312
+    38,    38,    38,    38,    38,    38,    38,    38,    38,    38,
  313
+    38,    38,    38,    38,    38,    38,    38,    38,    38,    38,
  314
+    38,   123,   123,   123,   123,   123,   123,   123,   123,   123,
  315
+   123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
  316
+   123,   123,   nil,   nil,   nil,   nil,   123,    85,    85,    85,
  317
+    85,    85,    85,    85,    85,    85,    85,    85,    85,    85,
  318
+    85,    85,    85,    85,    85,    85,    85,    85,    40,    40,
  319
+    40,    40,    40,    40,    40,    40,    40,    40,    40,    40,
  320
+    40,    40,    40,    40,    40,    40,    40,    40,    40,   116,
  321
+   116,   116,   116,   116,   116,   116,   116,   116,   116,   116,
  322
+   116,   116,   116,   116,   116,   116,   116,   116,   116,   116,
  323
+    88,    88,    88,    88,    88,    88,    88,    88,    88,    88,
  324
+    88,    88,    88,    88,    88,    88,    88,    88,    88,    88,
  325
+    88,    94,    94,    94,    94,    94,    94,    94,    94,    94,
  326
+    94,    94,    94,    94,    94,    94,    94,    94,    94,    94,
  327
+    94,    94,    25,    25,    25,    25,    25,    25,    25,    25,
  328
+    25,    25,    25,    25,    25,    25,    25,    25,    25,    25,
  329
+    25,    25,    25,   111,   111,   111,   111,   111,   111,   111,
  330
+   111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
  331
+   111,   111,   111,   111,    78,    78,    78,    78,    78,    78,
  332
+    78,    78,    78,    78,    78,    78,    78,    78,    78,    78,
  333
+    78,    78,    78,    78,    78,    90,    90,    90,    90,    90,
  334
+    90,    90,    90,    90,    90,    90,    90,    90,    90,    90,
  335
+    90,    90,    90,    90,    90,    90,    92,    92,    92,    92,
  336
+    92,    92,    92,    92,    92,    92,    92,    92,    92,    92,
  337
+    92,    92,    92,    92,    92,    92,    92,    99,    99,    99,
  338
+    99,    99,    99,    99,    99,    99,    99,    99,    99,    99,
  339
+    95,    95,    95,    95,    95,    95,    95,    95,    95,    95,
  340
+    95,    95,    95,    96,    96,    96,    96,    96,    96,    96,
  341
+    96,    96,    96,    96,    96,    96,   105,   105,   105,   105,
  342
+   105,   105,   105,   105,   105,   105,   105,   105,   105,   103,
  343
+   103,   103,   103,   103,   103,   103,   103,   103,   103,   103,
  344
+   103,   103,    97,    97,    97,    97,    97,    97,    97,    97,
  345
+    97,    97,    97,    97,    97,   101,   101,   101,   101,   101,
  346
+   101,   101,   101,   101,   101,   101,   101,   101,    86,    86,
  347
+    86,    86,    86,    86,    86,    86,    86,    86,    86,    86,
  348
+    86 ]
  349
+
  350
+racc_action_pointer = [
  351
+   132,     6,    -3,   nil,    -9,   116,   nil,   nil,    -2,   175,
  352
+   nil,   191,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    85,
  353
+   250,   nil,   nil,    38,   nil,  1355,     0,   368,   nil,   411,
  354
+   -11,   -14,   nil,   nil,    43,    58,    14,   588,  1201,   -31,
  355
+  1271,   nil,   nil,     1,    11,   765,  1135,   824,   840,   883,
  356
+   899,   942,   958,  1001,  1017,  1060,  1076,  1119,   781,   722,
  357
+   706,   663,   647,   604,   529,   486,   470,   427,   100,   nil,
  358
+    61,   nil,    86,    22,    73,   -28,   nil,     5,  1397,   545,
  359
+   234,   nil,   309,   nil,   nil,  1250,  1551,   266,  1313,   207,
  360
+  1418,   148,  1439,    89,  1334,  1473,  1486,  1525,   nil,  1460,
  361
+   nil,  1538,   nil,  1512,    74,  1499,    85,    48,   nil,   nil,
  362
+   nil,  1376,    -9,   nil,  1167,    32,  1292,   nil,   nil,   352,
  363
+   nil,   nil,   293,  1224,    57,   nil,    18,   nil ]
  364
+
  365
+racc_action_default = [
  366
+    -1,   -59,   -54,    -7,    -8,   -51,    -9,   -10,   -51,   -51,
  367
+   -11,   -51,   -16,   -12,   -18,   -17,   -13,   -19,   -14,   -72,
  368
+   -51,   -20,   -15,    -2,   -21,    -3,   -72,   -51,   -22,   -51,
  369
+   -72,   -72,   -56,   -60,   -59,   -72,   -51,   -51,   -72,   -72,
  370
+   -66,   -27,   -25,   -72,   -72,    -5,   -51,   -51,   -51,   -51,
  371
+   -51,   -51,   -51,   -51,   -51,   -51,   -51,   -51,   -51,   -51,
  372
+   -51,   -51,   -51,   -51,   -51,   -51,   -51,   -51,   -72,   -26,
  373
+    -6,   -57,   -72,   -72,   -51,   -72,   -55,   -72,   -23,   -51,
  374
+   -51,   -64,   -51,   128,   -49,    -4,   -44,   -33,   -45,   -34,
  375
+   -46,   -35,   -47,   -36,   -48,   -37,   -38,   -39,   -28,   -40,
  376
+   -29,   -41,   -30,   -42,   -31,   -43,   -32,   -72,   -53,   -62,
  377
+   -61,   -24,   -72,   -63,   -72,   -72,   -67,   -50,   -58,   -51,
  378
+   -68,   -69,    -5,   -72,   -51,   -70,   -72,   -71 ]
  379
+
  380
+racc_goto_table = [
  381
+    34,   109,   110,    23,    38,    30,    39,    40,    41,    19,
  382
+    42,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  383
+   nil,   nil,    45,    44,   nil,   nil,    69,   nil,   nil,    72,
  384
+   nil,   nil,    70,   nil,    77,    40,    78,    80,    75,   nil,
  385
+   nil,   109,   nil,    45,    85,    86,    87,    88,    89,    90,
  386
+    91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
  387
+   101,   102,   103,   104,   105,   106,   nil,   nil,   nil,    45,
  388
+   107,   nil,   nil,   111,   112,   nil,   nil,   nil,   114,   nil,
  389
+   nil,   116,   nil,   115,   nil,   nil,   nil,   nil,   nil,   nil,
  390
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  391
+   nil,   nil,   nil,   nil,   nil,   nil,    45,   nil,   nil,   nil,
  392
+   nil,   nil,   nil,   nil,   122,   nil,   nil,   nil,   123,   nil,
  393
+   nil,    85,   nil,   nil,   nil,    45,   nil,   126 ]
  394
+
  395
+racc_goto_check = [
  396
+     4,    14,    14,     2,     3,    16,    17,     3,     3,     1,
  397
+     3,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  398
+   nil,   nil,     4,     2,   nil,   nil,     3,   nil,   nil,     4,
  399
+   nil,   nil,     2,   nil,    17,     3,     3,     4,    16,   nil,
  400
+   nil,    14,   nil,     4,     3,     3,     3,     3,     3,     3,
  401
+     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
  402
+     3,     3,     3,     3,     3,     3,   nil,   nil,   nil,     4,
  403
+     2,   nil,   nil,     3,     4,   nil,   nil,   nil,     3,   nil,
  404
+   nil,     3,   nil,     2,   nil,   nil,   nil,   nil,   nil,   nil,
  405
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
  406
+   nil,   nil,   nil,   nil,   nil,   nil,     4,   nil,   nil,   nil,
  407
+   nil,   nil,   nil,   nil,     4,   nil,   nil,   nil,     3,   nil,
  408
+   nil,     3,   nil,   nil,   nil,     4,   nil,     2 ]
  409
+
  410
+racc_goto_pointer = [
  411
+   nil,     9,     3,    -1,    -1,   nil,   nil,   nil,   nil,   nil,
  412
+   nil,   nil,   nil,   nil,   -71,   nil,     4,    -2 ]
  413
+
  414
+racc_goto_default = [
  415
+   nil,   nil,   nil,    25,    29,     3,     4,     6,     7,    10,
  416
+    13,    16,    18,    22,    33,    26,   nil,   nil ]
  417
+
  418
+racc_reduce_table = [
  419
+  0, 0, :racc_error,
  420
+  0, 51, :_reduce_1,
  421
+  1, 51, :_reduce_2,
  422
+  1, 52, :_reduce_3,
  423
+  3, 52, :_reduce_4,
  424
+  2, 52, :_reduce_5,
  425
+  2, 52, :_reduce_6,
  426
+  1, 53, :_reduce_none,
  427
+  1, 53, :_reduce_none,
  428
+  1, 53, :_reduce_none,
  429
+  1, 53, :_reduce_none,
  430
+  1, 53, :_reduce_none,
  431
+  1, 53, :_reduce_none,
  432
+  1, 53, :_reduce_none,
  433
+  1, 53, :_reduce_none,
  434
+  1, 53, :_reduce_none,
  435
+  1, 54, :_reduce_none,
  436
+  1, 54, :_reduce_none,
  437
+  1, 55, :_reduce_18,
  438
+  1, 55, :_reduce_19,
  439
+  1, 55, :_reduce_20,
  440
+  1, 55, :_reduce_21,
  441
+  1, 55, :_reduce_22,
  442
+  3, 58, :_reduce_23,
  443
+  3, 64, :_reduce_24,
  444
+  2, 61, :_reduce_25,
  445
+  2, 61, :_reduce_26,
  446
+  2, 61, :_reduce_27,
  447
+  3, 61, :_reduce_28,
  448
+  3, 61, :_reduce_29,
  449
+  3, 61, :_reduce_30,
  450
+  3, 61, :_reduce_31,
  451
+  3, 61, :_reduce_32,
  452
+  3, 61, :_reduce_33,
  453
+  3, 61, :_reduce_34,
  454
+  3, 61, :_reduce_35,
  455
+  3, 61, :_reduce_36,
  456
+  3, 61, :_reduce_37,
  457
+  3, 61, :_reduce_38,
  458
+  3, 61, :_reduce_39,
  459
+  3, 61, :_reduce_40,
  460
+  3, 61, :_reduce_41,
  461
+  3, 61, :_reduce_42,
  462
+  3, 61, :_reduce_43,
  463
+  3, 61, :_reduce_44,
  464
+  3, 61, :_reduce_45,
  465
+  3, 61, :_reduce_46,
  466
+  3, 61, :_reduce_47,
  467
+  3, 61, :_reduce_48,
  468
+  3, 60, :_reduce_49,
  469
+  4, 60, :_reduce_50,
  470
+  0, 65, :_reduce_51,
  471
+  1, 65, :_reduce_52,
  472
+  3, 65, :_reduce_53,
  473
+  1, 56, :_reduce_54,
  474
+  3, 56, :_reduce_55,
  475
+  2, 59, :_reduce_56,
  476
+  3, 59, :_reduce_57,
  477
+  5, 59, :_reduce_58,
  478
+  0, 66, :_reduce_59,
  479
+  1, 66, :_reduce_60,
  480
+  3, 66, :_reduce_61,
  481
+  3, 66, :_reduce_62,
  482
+  4, 57, :_reduce_63,
  483
+  3, 62, :_reduce_64,
  484
+  0, 67, :_reduce_65,
  485
+  1, 67, :_reduce_66,
  486
+  3, 67, :_reduce_67,
  487
+  5, 63, :_reduce_68,
  488
+  5, 63, :_reduce_69,
  489
+  7, 63, :_reduce_70,
  490
+  8, 63, :_reduce_71 ]
  491
+
  492
+racc_reduce_n = 72
  493
+
  494
+racc_shift_n = 128
  495
+
  496
+racc_token_table = {
  497
+  false => 0,
  498
+  :error => 1,
  499
+  :IF => 2,
  500
+  :ELSE => 3,
  501
+  :THEN => 4,
  502
+  :NEWLINE => 5,
  503
+  :NUMBER => 6,
  504
+  :STRING => 7,
  505
+  :TRUE => 8,
  506
+  :FALSE => 9,
  507
+  :NULL => 10,
  508
+  :IDENTIFIER => 11,
  509
+  :PROPERTY_ACCESS => 12,
  510
+  :CODE => 13,
  511
+  :UMINUS => 14,
  512
+  :NOT => 15,
  513
+  "!" => 16,
  514
+  "*" => 17,
  515
+  "/" => 18,
  516
+  "%" => 19,
  517
+  "+" => 20,
  518
+  "-" => 21,
  519
+  "<=" => 22,
  520
+  "<" => 23,
  521
+  ">" => 24,
  522
+  ">=" => 25,
  523
+  "==" => 26,
  524
+  "!=" => 27,
  525
+  :IS => 28,
  526
+  :AINT => 29,
  527
+  "&&" => 30,
  528