
#Uncomment the next line and set it to the actual path of your SableCC Ver.3
#SABLECCDIR = $HOME/Sablecc3

# to compile the grammar using Sablecc3
compilegrammar: 
	java -jar $(SABLECCDIR)/lib/sablecc.jar tiny.sablecc


# to compile the code
compilecode: 
	javac tiny/lexer/*.java tiny/parser/*.java tiny/node/*.java tiny/analysis/*.java tiny/*.java

# to clean out all files
clean:
	find tiny -name '*.class' | xargs rm
	find tiny -name '*.dat' | xargs rm
	rm -f result

check:
	./check

realclean:	
	rm -fr tiny/*.class tiny/lexer/ tiny/parser/ tiny/node/ tiny/analysis/ result