Avoid warnings while generating the parser

This commit is contained in:
Felipe Zimmerle 2020-12-18 11:18:03 -03:00
parent ae6ddf01fa
commit 2270b204e5
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
3 changed files with 7 additions and 1 deletions

View File

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

View File

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

View File

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