X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=lib%2Fdefun_lex.l;h=6c0805a4fa9b4542319eaf82476b35d6bae53698;hb=b40e2630eb94cb6d63f1f15bc6f344d8a059b4c7;hp=8aa37a62a205ee9d691735c993702dc39257589f;hpb=5bee21f37c2d33d512fd0e7505a647e7f00eb2bb;p=mirror_frr.git diff --git a/lib/defun_lex.l b/lib/defun_lex.l index 8aa37a62a..6c0805a4f 100644 --- a/lib/defun_lex.l +++ b/lib/defun_lex.l @@ -1,4 +1,3 @@ -%{ /* * clippy (CLI preparator in python) C pseudo-lexer * Copyright (C) 2016-2017 David Lamparter for NetDEF, Inc. @@ -34,8 +33,15 @@ * code documentation in it. */ -/* ignore harmless bug in old versions of flex */ +%top{ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +} +%{ +/* ignore harmless bugs in old versions of flex */ #pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wunused-value" #include "config.h" #include @@ -85,7 +91,7 @@ SPECIAL [(),] %option noyywrap %option noinput %option nounput -%option outfile="defun_lex.c" +%option outfile="lib/defun_lex.c" %option prefix="def_yy" %option 8bit @@ -131,6 +137,9 @@ SPECIAL [(),] "DEFUN_NOSH" value = strdup(yytext); return DEFUNNY; "DEFUN_HIDDEN" value = strdup(yytext); return DEFUNNY; "DEFPY" value = strdup(yytext); return DEFUNNY; +"DEFPY_NOSH" value = strdup(yytext); return DEFUNNY; +"DEFPY_ATTR" value = strdup(yytext); return DEFUNNY; +"DEFPY_HIDDEN" value = strdup(yytext); return DEFUNNY; "ALIAS" value = strdup(yytext); return DEFUNNY; "ALIAS_HIDDEN" value = strdup(yytext); return DEFUNNY; "install_element" value = strdup(yytext); return INSTALL;