This is a Java implementation of a Lexer explained in the book Principles of Compiler Design written by Alfred Aho and Jeffrey D. Ullman.
What I will go to implement are the transaction diagram to recognize the relationship operations, identificators, numbers, separator and blank spaces.
The separator are the symbol:
- {} [] ()
- , ; .
The blanck spaces are recognized but not returned.
They are:
- empty space character
- new line character
- tabulation character
You can import this project in Eclipse and run it normally.
- lang.txt: contains your language
- keywords.txt: contains your keywords