blob: ea354d9440e14a0f3714a500ebde06521fdbf963 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# $Id: simple_grammar.tac,v 1.1 2004/08/18 23:53:43 tang Exp $
%{
source simple_scanner.tcl
%}
%token ID
%%
E: E '+' T
| T
;
T: T '*' F
| F
;
F: '(' E ')'
| ID
;
%%
yyparse
|