Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 555 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 555 Bytes

PHPCompiler

To run :

$ chmod 777 parse.sh
$ ./parse.sh

Files:

lex_file.c

Lexer file - Returns tokens to parser when input text matches.
Prints invalid character if text not matched.
Ignores comments, whitespaces and newlines.

yacc_file.c

Parser - Returns whether input was parsed successfully (valid) or not.
Contains the grammar for valid PHP code.
Prints errors along with line number on invalid input.

remove.l

Lexer file - Prodcues a copy of the input php file without comments