X-Git-Url: http://git.onelab.eu/?p=iproute2.git;a=blobdiff_plain;f=tc%2Femp_ematch.y;fp=tc%2Femp_ematch.y;h=0000000000000000000000000000000000000000;hp=e8d1671c22e68b0f291e360343e6d60449906a1e;hb=3331a68859fd71047bb1f309048960b48eab2d83;hpb=2bd4a72f2100be7ad7d9518cb1d49bb2a5b71994 diff --git a/tc/emp_ematch.y b/tc/emp_ematch.y deleted file mode 100644 index e8d1671..0000000 --- a/tc/emp_ematch.y +++ /dev/null @@ -1,101 +0,0 @@ -%{ - #include - #include - #include - #include - #include "m_ematch.h" -%} - -%locations -%token-table -%error-verbose -%name-prefix="ematch_" - -%union { - unsigned int i; - struct bstr *b; - struct ematch *e; -} - -%{ - extern int ematch_lex(void); - extern void yyerror(char *s); - extern struct ematch *ematch_root; - extern char *ematch_err; -%} - -%token ERROR -%token ATTRIBUTE -%token AND OR NOT -%type invert relation -%type match expr -%type args -%right AND OR -%start input -%% -input: - /* empty */ - | expr - { ematch_root = $1; } - | expr error - { - ematch_root = $1; - YYACCEPT; - } - ; - -expr: - match - { $$ = $1; } - | match relation expr - { - $1->relation = $2; - $1->next = $3; - $$ = $1; - } - ; - -match: - invert ATTRIBUTE '(' args ')' - { - $2->next = $4; - $$ = new_ematch($2, $1); - if ($$ == NULL) - YYABORT; - } - | invert '(' expr ')' - { - $$ = new_ematch(NULL, $1); - if ($$ == NULL) - YYABORT; - $$->child = $3; - } - ; - -args: - ATTRIBUTE - { $$ = $1; } - | ATTRIBUTE args - { $1->next = $2; } - ; - -relation: - AND - { $$ = TCF_EM_REL_AND; } - | OR - { $$ = TCF_EM_REL_OR; } - ; - -invert: - /* empty */ - { $$ = 0; } - | NOT - { $$ = 1; } - ; -%% - - void yyerror(char *s) - { - ematch_err = strdup(s); - } -