//O1 -> +,-,*,/ bool O1() { if (now.word == "+" || now.word == "-" || now.word == "*" || now.word == "/") { Infix.Add(now); now = (token)tokenlist[count++]; return(true); } else { return(false); } }
//I -> id | int_const | float_const | string_const bool I() { if (now.clss == "ID" || now.clss == "INT_CONST" || now.clss == "FLOAT_CONST") { MatchDataType.Add(CheckDataType(now)); Infix.Add(now); now = (token)tokenlist[count++]; return(true); } else { return(false); } }