Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 866 Bytes

File metadata and controls

25 lines (21 loc) · 866 Bytes

Lexical Analyzer

lexical analyzer for python in python

Dependencies

python 2.7

Running the lexical analyzer

To run the lexical analyzer on a python file you need to add the file in the same directory. For example there is an file titled example.py. To run the lexical analyzer on this file, use the terminal and run python analyze.py then the program waits for a file name to be entered, so enter example.py and the output will be the lexical analysis of the python file example.py. You can analyze any python file to get the lexical analysis.

Working

  • Lexical Analysis
  • Empty input file handling
  • File doesn't exist handling
  • Finds strings of any length
  • Correctly handles comments on their own line or a line with code
  • Punctuation is found
  • Keywords are found
  • ID's are found

Still Working On

  • Getting ID lexical errors