Skip to content

Java implementation of a Lexer described in "Principles of Compiler Design"

License

Notifications You must be signed in to change notification settings

CiccioTecchio/Lexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lexer

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.

Relop diagram


Identificator diagram


Number diagram


Separator diagram


The separator are the symbol:

  • {} [] ()
  • , ; .

Blank space diagram


The blanck spaces are recognized but not returned.
They are:

  • empty space character
  • new line character
  • tabulation character

How to run

You can import this project in Eclipse and run it normally.

  • lang.txt: contains your language
  • keywords.txt: contains your keywords

About

Java implementation of a Lexer described in "Principles of Compiler Design"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages