Skip to content

NitnelavAH/python-lexer-analyzer

This branch is up to date with chrismachado/python-lexer-analyzer:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e80693e · Feb 3, 2020

History

23 Commits
Jan 30, 2020
Jan 30, 2020
Jan 30, 2020
Jan 30, 2020
Jan 24, 2020
Feb 3, 2020

Repository files navigation

Python Lexer Analyzer with JFlex

We developed a lexical analyzer for python using JFlex library.

Prerequisites

JFlex

JFlex is a lexical analyzer generator (also known as scanner generator) for Java, written in Java.

Develop Enviroment

We're using the IntelliJ IDEA. But, you can do this on command line if you want.

Getting Started

Clone this rep by using

$ git clone https://github.com/chrismachado/Python-Lexer-Analyzer.git

Running the Analyzer

First of all, you need the Lexical class for it. So, you can get it with by running the bin/LexerGenMain, that should be the result:

lexergen

After that, you need to run the GUI view/InputPyFileScreen, than choose your Python file. We have some examples in files/, you could use it or run your own code.

input1

The Python Tokens are listed in to class bin/PyTokens as we show.

PS*: This list will be modified.

pytokens

After you load your code, hit the Analyze button and you can see the Token, type and line of it. On bottom side, we show a table with the amount of each token. Like this.

input1

Authors

Acknowledgments

About

Python interpreter with Java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lex 37.2%
  • Java 35.1%
  • Python 27.3%
  • HTML 0.4%