This project is a Java-based parser for a BASIC-like programming language. It processes variable assignments, arithmetic expressions, conditionals (IF statements), and user input (INPUT, PRINT).
Open a terminal or command prompt and run: git clone https://github.com/Eashamashud/BASIC-Language-Parser.git cd BASIC-Language-Parser
Make sure Java 8+ is installed on your system:
If Java is not installed:
-
Windows: Download Java from Oracle or install via Chocolatey:
-
Mac: Install via Homebrew:
-
Linux (Ubuntu/Debian):
For those not using an IDE, compile and run the project using: javac -d bin src/*.java java -cp bin Basic path/to/test-file.basic
📌 Example Usage: java -cp bin Basic src/basic_test_file.basic
- Open the project in IntelliJ IDEA.
- Mark
srcas a Sources Root:- In Project Explorer, right-click
src→ "Mark Directory as" → "Sources Root".
- In Project Explorer, right-click
- Edit Run Configurations:
- Go to Run → Edit Configurations.
- Under "Program Arguments", paste the full path to your test file.
- Click Apply, then OK.
- Run the Project:
- Find
Basic.main(), then press Run▶️ .
- Find
If you're using VS Code or Eclipse, ensure Java is set up correctly, and run the program with a test file as a command-line argument.
For VS Code:
- Install the Java Extension Pack (if not installed).
- Open the project in VS Code.
- Modify
"args"inlaunch.json: "args": ["src/basic_test_file.basic"]
For Eclipse:
- Import the project as a Java Project.
- Right-click
src, select "Build Path" → "Use as Source Folder". - Go to Run Configurations → Arguments, add the test file path under "Program Arguments".
- Click Run.