
November 17th, 2009, 06:34 PM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 1
Time spent in forums: 47 m 12 sec
Reputation Power: 0
|
|
|
Other Language - A problem with Lex
Hi,
I have some problem with Lex
if I write 1 + 1 I'm getting:
Found token INT ('1')
Found token OP ('+')
Found token INT ('1')
If I write 1+1 I'm getting:
Found token INT ('1')
Found token INT ('+1')
+1 is part of the language, what do I need to change so if I will write 1+1 I will get same as if I will write 1 + 1?
this is my regular expressions:
SIGN [+-]
DIGIT [0-9]
DIGIT_NZ [1-9]
INTEGER ([0])|(({SIGN}{0,1})({DIGIT_NZ}{1})({DIGIT}*))
Thanks
|