|
-
February 27th, 2006, 06:30 PM
#1
Regular Expression for an identifier token
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|