amigosplayground
February 27th, 2006, 05:30 PM
I'm having trouble defining a regular expression for an identifier token. An identifier is defined as a letter followed by zero or more letters or digits or underscores. But there cannot be two consecutive underscores in the identifier. That's the part I'm having trouble with. How do I represent that there cannot be two consecutive underscores in the identifier?
Once I have this definition I can include it in the finite state machine that I'm making for my lexical analyzer.
Any help would be appreciated.
Thanks
Once I have this definition I can include it in the finite state machine that I'm making for my lexical analyzer.
Any help would be appreciated.
Thanks