]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/defun_lex.l
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / lib / defun_lex.l
index 8aa37a62a205ee9d691735c993702dc39257589f..6c0805a4fa9b4542319eaf82476b35d6bae53698 100644 (file)
@@ -1,4 +1,3 @@
-%{
 /*
  * clippy (CLI preparator in python) C pseudo-lexer
  * Copyright (C) 2016-2017  David Lamparter for NetDEF, Inc.
  * 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 <Python.h>
@@ -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;