comparison tests/agcl/parsifal/factor.syn @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:13d2b8934445
1 /*
2 * AnaGram, A System for Syntax Directed Programming
3 * Copyright 1993-2002 Parsifal Software. All Rights Reserved.
4 * See the file COPYING for license and usage terms.
5 */
6
7 factor $
8 -> "if", '(', true logical or exp, ',',
9 conditional exp:x, ',',
10 skip, ')' =x;
11
12 factor
13 -> "if", '(', false logical or exp, ',',
14 skip, ',',
15 conditional exp:y, ')' =y;
16
17 false logical or exp, true logical or exp
18 -> logical or exp:c ={if (c) CHANGE_REDUCTION("true_logical_or_exp");}
19
20
21 skip
22 -> skip char...
23
24 skip char
25 -> ~(eof + '(' + ')' + ',' + space)
26 -> balanced parens
27
28 balanced parens
29 -> '(', [~(eof + '(' + ')') | balanced parens]..., ')'
30
31 white space
32 -> space
33 -> comment
34
35 [
36 disregard white space
37 lexeme {skip char}
38 ]
39
40