lib/formulae/parse/formula_peg.rb in rubyfromexcel-0.0.10 vs lib/formulae/parse/formula_peg.rb in rubyfromexcel-0.0.13
- old
+ new
@@ -36,11 +36,11 @@
end
end
def string_join
node :string_join do
- thing && one_or_more { (space && ignore { terminal("&") } && space && thing) }
+ (arithmetic || thing) && one_or_more { (space && ignore { terminal("&") } && space && (arithmetic || thing)) }
end
end
def arithmetic
node :arithmetic do
@@ -60,10 +60,10 @@
end
end
def string
node :string do
- ignore { terminal("\"") } && terminal(/[^"]*/) && ignore { terminal("\"") }
+ ignore { terminal("\"") } && terminal(/(""|[^"])*/) && ignore { terminal("\"") }
end
end
def any_reference
external_reference || any_internal_reference