from rply import LexerGenerator


lg = LexerGenerator()

lg.add('NUMBER', r'\d+')
lg.add('PLUS', r'\+')
lg.add('MINUS', r'-')

lexer = lg.build()

@@ -118,16 +118,58 @@
 ', r'-')
+%0Alg.add('MUL', r'%5C*')%0Alg.add('DIV', r'%5C/')
 %0A%0Alexer 

improving the grammar