Parser - expressions Another example... primary_expr /* do symboltable lookup */ : identifier { $$ = newast_val(symval($1)); } /* add to AST as 'value' */ | CONSTANT { $$ = newast_val($1); } | string_literal | '(' expr ')' { $$ = $2; } /* strip parenthesis... */ ; string_literal /* string passed from scanner */ /* add string to ast as value */ : STRING_LITERAL { $$ = newast_val($1); } ;