|
| 1 | +# Python Lexer Analyzer with JFlex |
| 2 | +We developed a lexical analyzer for python using JFlex library. |
| 3 | + |
| 4 | +## Prerequisites |
| 5 | +- [Java](https://www.java.com/pt_BR/) |
| 6 | +- [JFlex](https://www.jflex.de/) |
| 7 | + |
| 8 | +## JFlex |
| 9 | +JFlex is a lexical analyzer generator (also known as scanner generator) for Java, written in Java. |
| 10 | + |
| 11 | +### Develop Enviroment |
| 12 | +We're using the IntelliJ IDEA. But, you can do this on command line if you want. |
| 13 | + |
| 14 | +### Getting Started |
| 15 | +Clone this rep by using |
| 16 | +> $ git clone https://github.com/chrismachado/Python-Lexer-Analyzer.git |
| 17 | +
|
| 18 | +### Running the Analyzer |
| 19 | +First of all, you need the Lexical class for it. So, you can get it with by running |
| 20 | +the *bin/LexerGenMain*, that should be the result: |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +After that, you need to run the GUI *view/InputPyFileScreen*, than choose your Python file. |
| 25 | +We have some examples in *files/*, you could use it or run your own code. |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +The Python Tokens are listed in to class *bin/PyTokens* as we show. |
| 30 | + |
| 31 | +PS*: This list will be modified. |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +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 |
| 36 | +a table with the amount of each token. Like this. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +### Authors |
| 41 | +- **Christiano Machado ** @ [email protected] |
| 42 | +- **Anderson Sales ** @ [email protected] |
| 43 | + |
| 44 | +### Acknowledgments |
| 45 | +- **Professor Bruno Silva** |
| 46 | + |
| 47 | + |
0 commit comments