The report can be found in the root directory under the name informe.pdf
PercyCompiler is a simple compiler implemented with Lex and Yacc for the PercyLanguage language. The PercyLanguage is a strongly-typed language that uses a syntax similar to javascript. This language allows you to generate simple static html files.
To generate the compiler executable, standing on the root project folder run the command make all
. This will generate the percy compiler executable.
To remove all the generated files, run the make clean
command.
./percy [OPTION]
OPTION:
-h Prints the help and finishes.
-v Prints the version and finishes.
-i <input-file> Sets the file to process, must have the '.percy' extension.
-o <output-file> Sets the output result file. The default is 'a.percyout'.
In the /examples
directory you can find some examples of the PercyLanguage syntax and functionality:
-
do_while_example.percy
: shows the syntax and functionality of the "do while" cycle. -
even_numbers_example.percy
: this file renders the first 6 even numbers. -
for_example.percy
: shows the syntax and functionality of the "for" cycle. -
if_example.percy
: shows the syntax and functionality of the "if-else" statement. -
while_example.percy
: shows the syntax and functionality of the "while" cycle.