koneb71 / csc-153

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

csc-153

Assignment #1

How to run?

  1. cd assignment1

  2. python run.py

  3. input file location

    • $ Enter File name (E.g. 'code.txt'): ./code.txt
    • will return the strings and tokenized list
    • Example [('symbol', 11), ('symbol', 3), ('number', 0), ('reservedKeyword', 6), ('string', 0), ('symbol', 3), ('number', 1), ('operator', 0), ('number', 2), ('operator', 6), ('string', 1), ('datatype', 0), ('symbol', 3), ('string', 2), ('datatype', 0), ('symbol', 10), ('function', 0), ('datatype', 0), ('reservedKeyword', 3)]
  4. you can now select which tokenized index to print

    • Example $ Select Index: 4
    • will return x for my life

About


Languages

Language:Python 100.0%