CiccioTecchio / Lexer

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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"

License:MIT License


Languages

Language:Java 100.0%