5 %token EOF NAME EQUAL SUP WINDOW_START WINDOW_END
6 %token <string> WIDGET_START WIDGET_END IDENT
8 %type <string> window_start
9 %type <string * string> property widget_start
10 %type <(string * string) list> property_list
11 %type <Utils.yywidget_tree> widget window
12 %type <Utils.yywidget_tree list> children window_list project
20 project : window_list EOF { List.rev $1 }
23 | window_list window { $2 :: $1 }
26 window : window_start property_list children WINDOW_END
28 Node (("window", $1, List.rev $2), $3)
32 window_start : WINDOW_START NAME EQUAL IDENT SUP { $4 }
36 | children widget { $2 :: $1 }
39 widget : widget_start property_list children WIDGET_END
41 let classe, name = $1 in
42 if classe <> $4 then raise Parsing.Parse_error;
43 Node ((classe, name, List.rev $2), $3)
47 widget_start : WIDGET_START NAME EQUAL IDENT SUP { $1, $4 }
50 property_list : { [] }
51 | property_list property { $2 :: $1 }
54 property : IDENT EQUAL IDENT { $1, $3 }