j-burgos / pyscanner

Simple Lexer based on regular expressions to transform a source code file into tokens

Home Page:http://j-burgos.github.io/pyscanner/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyScanner

Simple Lexer used to convert a source code file into tokens Currently using Javascript as an example language (language definition is in lang.py)

Usage: python pyscanner.py path/to/file

TODO:

  • Encapsulate into a function or class
  • Return (lexem, token) list
  • Load language lexic from a text file
  • Documentation

About

Simple Lexer based on regular expressions to transform a source code file into tokens

http://j-burgos.github.io/pyscanner/

License:GNU General Public License v2.0


Languages

Language:Python 96.0%Language:JavaScript 4.0%