To compile racc grammer file, simply type:
$ racc parse.yThis create ruby script file "parse.tab.y". -o option changes this.
If you want your own parser, you have to write grammer file.
A grammer file contains name of parser class, grammer the parser can parse,
user code, and any.
When writing grammer file, yacc's knowledge is helpful.
If you have not use yacc, also racc is too difficult.
grammer file is like this:
class Calcparser rule target: exp { print val[0] } ; exp: exp '+' exp | exp '*' exp | '(' exp ')' | NUMBER ; endRacc grammer file is resembles to yacc file. (continue)