This is an example compiler written in Lex, Yacc and C++.
The language is called "qP+" and is similar to pascal.
compiler.tar.gz - an example compiler written in lex, yacc and C++.
The Compiler Source Code
qp.l - lex source code for the scanner qp.y - yacc source code for the parser asm.java - Java BYTECODE assembly language
Example Programs
p1.qp - qP+ test program 1 p1.asm - bytecode assembly language output p2.qp - qP+ test program 2 p2.asm - bytecode assembly language output p3.qp - qP+ test program 3 p3.asm - bytecode assembly language output