adds basic math operators, thanks to kasper associative and prioritised

This commit is contained in:
Torsten Ruger
2014-05-10 21:41:46 +03:00
parent 6378209f33
commit 2d389d2e00
7 changed files with 108 additions and 5 deletions

View File

@@ -12,7 +12,10 @@ module Parser
rule(:comma) { str(',') >> space? }
rule(:colon) { str(':') >> space? }
rule(:semicolon) { str(';') >> space? }
rule(:question_mark) { str('?') >> space? }
rule(:excamation_mark) { str('!') >> space? }
rule(:question_mark) { str('?') >> space? }
rule(:excamation_mark) { str('!') >> space? }
rule(:multiply) { match['*/'] >> space? }
rule(:plus) { match['+-'] >> space? }
end
end