From: Ondrej Zajicek Date: Tue, 4 Jul 2023 17:07:30 +0000 (+0200) Subject: Filter: Better syntax for function return types X-Git-Tag: v2.14~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc4398b4e1d18142a5c428a7c90484071a81ab9c;p=thirdparty%2Fbird.git Filter: Better syntax for function return types The C-style syntax does not really fit into rest of our syntax. --- diff --git a/conf/cf-lex.l b/conf/cf-lex.l index dcd54b813..cee0e63e9 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -380,6 +380,7 @@ else: { \>\= return GEQ; \&\& return AND; \|\| return OR; +\-\> return IMP; \[\= return PO; \=\] return PC; diff --git a/conf/confbase.Y b/conf/confbase.Y index 2efeb29f9..7b368fc6d 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -98,7 +98,7 @@ CF_DECLS } %token END CLI_MARKER INVALID_TOKEN ELSECOL DDOT -%token GEQ LEQ NEQ AND OR +%token GEQ LEQ NEQ AND OR IMP %token PO PC %token NUM ENUM %token IP4 @@ -125,7 +125,7 @@ CF_DECLS %nonassoc PREFIX_DUMMY %left AND OR -%nonassoc '=' '<' '>' '~' GEQ LEQ NEQ NMA PO PC +%nonassoc '=' '<' '>' '~' GEQ LEQ NEQ NMA IMP PO PC %left '+' '-' %left '*' '/' '%' %left '!' diff --git a/doc/bird.sgml b/doc/bird.sgml index 3fcf0025d..3be266cbf 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -539,7 +539,7 @@ include "tablename.conf";; Define a filter. You can learn more about filters in the following chapter. -