lib/formulae/parse/formula_peg.rb in rubyfromexcel-0.0.7 vs lib/formulae/parse/formula_peg.rb in rubyfromexcel-0.0.9

- old
+ new

@@ -11,11 +11,11 @@ optional { space } && one_or_more { expression } end end def expression - string_join || arithmetic || comparison || thing + string_join || comparison || arithmetic || thing end def thing function || brackets || any_reference || string || percentage || number || boolean || prefix || named_reference end @@ -48,11 +48,11 @@ end end def comparison node :comparison do - thing && space && comparator && space && thing + (arithmetic || thing) && space && comparator && space && (arithmetic || thing) end end def comparator node :comparator do @@ -109,10 +109,10 @@ ignore { terminal("[") } && (range_structured_reference || complex_structured_reference || overly_structured_reference || simple_structured_reference) && ignore { terminal("]") } end end def table_name - terminal(/[.a-zA-Z0-9]+/) + terminal(/[.a-zA-Z0-9_]+/) end def range_structured_reference terminal(/\[[^\u005d]*\],\[[^\u005d]*\]:\[[^\u005d]*\]/) end