컴파일러 - javacc로 계산기 만들기(소스)
options { STATIC = false;} PARSER_BEGIN(Calculator) import java.io.PrintStream; class Calculator{ static public void main(String[] args) throws ParseException, TokenMgrError,NumberFormatException{ Calculator parser=new Calculator(System.in); parser.Start(System.out); } double previousValue=0.0; }PARSER_END(Calculator) SKIP : {" "}TOKEN : { }TOKEN : { ..