A Java-based implementation of a NFA design that recognizes Python numeric literals (decinteger, octinteger, hexinteger, floatnumber) based on Python's 3.14.0 Documentation.
Compile and run the program with the following commands
javac -d out $(find src -name "*.java")
java -cp out Main
After running the program, you will be prompted to either:
-
Input a string
Enter test cases individually and see their respective results
-
Run Test File
By default, reads
tests/in_ans_combined.txtand outputs the results intests/out_combined.txt.To change the input file, please modify line 61:
String inputFile = "tests/diff_input.txt";.
Liam Buckman (@lebuckman)
- Designed JFLAP diagrams for the required integers and floatnumbers:
py-floats.jffandpy-integers.jff - Improved JFLAP diagram of combined required integers and floatnumbers:
py-combined.jff - Implemented NFA logic in the
automatapackage, containing classes that define a NFA such as its states and transitions - Implemented
FloatNFA.javathat defines the NFA for floatnumbers
Nirwisha Singh (@Nirwisha)
- Designed JFLAP diagram that combines the required integers and floatnumbers:
py-combined.jff - Implemented I/O logic in the
iopackage, containing classes that read from a test file and write to a results file - Implemented
CombinedNFA.javathat defines the NFA for both the required integers and floatnumbers - Implemented
Main.javato provide user interaction with program