Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for debian jessie (with bison 3.0.x) #4

Merged
merged 1 commit into from
Sep 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ noinst_HEADERS = tengcache.h tengcode.h tengcontenttype.h \
tengfunction.h tenginstruction.h tenglex1.h \
tengparsercontext.h tengparservalue.h tengprocessor.h \
tengprogram.h tengsourcelist.h tengtemplate.h \
tengutil.h tengwriter.h tengsyntax.h tengconfiguration.h \
tengplatform.h tengaux.h
tengutil.h tengwriter.h tengsyntax.hh tengconfiguration.h \
tengplatform.h tengaux.h

# compile this library
lib_LTLIBRARIES = libteng.la
Expand All @@ -73,12 +73,13 @@ libteng_la_LDFLAGS = @VERSION_INFO@
libteng_la_LIBADD = $(LTLIBOBJS) ${DEPENS_LIBS}

# explicit rules for proper flex & bison sources compilation
tenglex2.cc: tenglex2.ll tengsyntax.h tengsyntax.cc
tengsyntax.h: tengsyntax.yy
tenglex2.cc: tenglex2.ll tengsyntax.hh tengsyntax.cc
tengsyntax.hh: tengsyntax.yy
tengsyntax.cc: tengsyntax.yy

# test program
#noinst_PROGRAMS =

doc:
doxygen

2 changes: 1 addition & 1 deletion src/tenglex2.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#ifndef TENGLEX2_H
#define TENGLEX2_H

#include "tengsyntax.h"
#include "tengsyntax.hh"

/** @short Maximal depth of lex stack.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/tenglex2.ll
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#include <stdio.h>

#include "tengyystype.h"
#include "tengsyntax.h"
#include "tengsyntax.hh"
#include "tengparsercontext.h"
#include "tengerror.h"

Expand Down
8 changes: 4 additions & 4 deletions src/tengsyntax.yy
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
* Better error reporting when unexpected EOF
*/

%param {void *context}

// all external symbols will be prefixed with tengSyntax_
%name-prefix="tengSyntax_"

%lex-param {void * scanner}

// we want to have y.tab.h
%defines

Expand Down Expand Up @@ -85,7 +85,7 @@ namespace Teng {

// local function prototypes
static int yylex(YYSTYPE *leftValue, void *context);
static int yyerror(const char *msg);
static int yyerror(void *context, const char *msg);

// errlog function
static void printUnexpectedElement(ParserContext_t *context,
Expand Down Expand Up @@ -2272,7 +2272,7 @@ static int yylex(YYSTYPE *leftValue, void *context)
* Function is unusable, because it does not know parser context :-((
* @return 0=ok.
* @param msg Error message to show. */
static int yyerror(const char *msg)
static int yyerror(void *context, const char *msg)
{
#if YYDEBUG
// if debug enabled
Expand Down