Avoid warnings while generating the parser

This commit is contained in:
Felipe Zimmerle 2020-12-18 11:18:03 -03:00 committed by Felipe Zimmerle
parent bedc9a1eb0
commit fa877bd5fc
3 changed files with 7 additions and 1 deletions

View File

@ -141,6 +141,7 @@ LT_INIT([dlopen])
# Identify platform # Identify platform
AC_CANONICAL_HOST AC_CANONICAL_HOST
CUSTOM_YFLAGS=""
case $host in case $host in
*-*-aix*) *-*-aix*)
echo "Checking platform... Identified as AIX" echo "Checking platform... Identified as AIX"
@ -161,6 +162,7 @@ case $host in
echo "Checking platform... Identified as Linux" echo "Checking platform... Identified as Linux"
AC_DEFINE([LINUX], [1], [Define if the operating system is LINUX]) AC_DEFINE([LINUX], [1], [Define if the operating system is LINUX])
PLATFORM="Linux" PLATFORM="Linux"
CUSTOM_YFLAGS="-d -Wno-yacc"
;; ;;
*-*-solaris*) *-*-solaris*)
echo "Checking platform... Identified as Solaris" echo "Checking platform... Identified as Solaris"
@ -207,6 +209,8 @@ esac
MSC_BASE_DIR=`pwd` MSC_BASE_DIR=`pwd`
AC_SUBST([MSC_BASE_DIR]) AC_SUBST([MSC_BASE_DIR])
AC_SUBST([CUSTOM_YFLAGS])
MSC_VERSION_INFO=msc_version_info MSC_VERSION_INFO=msc_version_info
AC_SUBST([MSC_VERSION_INFO]) AC_SUBST([MSC_VERSION_INFO])

View File

@ -1,6 +1,8 @@
noinst_LTLIBRARIES = libmodsec_parser.la noinst_LTLIBRARIES = libmodsec_parser.la
AM_YFLAGS = $(CUSTOM_YFLAGS)
BUILT_SOURCES = \ BUILT_SOURCES = \
seclang-parser.cc \ seclang-parser.cc \
test.cc test.cc

View File

@ -1,7 +1,7 @@
%skeleton "lalr1.cc" /* -*- C++ -*- */ %skeleton "lalr1.cc" /* -*- C++ -*- */
%require "3.0.2" %require "3.0.2"
%defines %defines
%define parser_class_name {seclang_parser} %define api.parser.class {seclang_parser}
%define api.token.constructor %define api.token.constructor
%define api.value.type variant %define api.value.type variant
//%define api.namespace {modsecurity::yy} //%define api.namespace {modsecurity::yy}