Skip to content

ABDELHAKIMDZ/php-compiler-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniPHPCompiler

A Java-based lexical and syntax analyzer for a simplified PHP-like language with support for variable declarations, assignments, control structures (including foreach), and expressions.

Features

  • Lexer recognizing keywords, identifiers, numbers, strings, and operators.
  • Parser supporting variable decl, assignment, if/else, while, foreach, and expressions.
  • Error reporting for syntactic mistakes.
  • Easily extensible grammar (see grammar/MiniPHPGrammar.txt).

Usage

Run:

javac -d bin src/*.java
java -cp bin src.Main

Test files are in test/sample.php.

About

Java compiler for simplified PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages