summaryrefslogtreecommitdiffstats
path: root/filter/test.conf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-03-23 12:49:53 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2011-03-23 12:49:53 +0100
commit26d92bb8921ac4e022cdc88bde8fc7bc617f8766 (patch)
tree5e900b466e46e1848b4d2bd98a5894cf6214b08b /filter/test.conf
parent6bcef22580010aec695fb2b559c7b33ee00261b0 (diff)
downloadbird-26d92bb8921ac4e022cdc88bde8fc7bc617f8766.tar
bird-26d92bb8921ac4e022cdc88bde8fc7bc617f8766.zip
A hack to distinguish if..else from else: in case.
The old BIRD grammar needs two lookaheads to distinguish if..else from else: in case, which caused the parser to fail on some combinations of both expressions. This patch replaces two tokens 'else' ':' by one token 'else:' to fix that.
Diffstat (limited to 'filter/test.conf')
-rw-r--r--filter/test.conf13
1 files changed, 7 insertions, 6 deletions
diff --git a/filter/test.conf b/filter/test.conf
index 40fff19..6d7a708 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -27,14 +27,15 @@ int local1;
int local2;
int i;
{
- printn "Function callme called arguments ", arg1, " and ", arg2, ":" ;
+ printn "Function callme called arguments ", arg1, " and ", arg2, ": " ;
i = arg2;
case arg1 {
- 2: print "dva"; print "jeste jednou dva";
- 3 .. 5: print "tri az pet";
- else: print "neco jineho";
- }
+ 2: printn "dva, "; printn "jeste jednou dva";
+ 3 .. 5: if arg2 < 3 then printn "tri az pet";
+ else: printn "neco jineho";
+ }
+ print;
}
function fifteen()
@@ -247,7 +248,7 @@ string s;
callme ( 2, 2 );
callme ( 2, 2 );
callme ( 3, 2 );
- callme ( 4, 2 );
+ callme ( 4, 4 );
callme ( 7, 2 );
i = fifteen();