Skip to content
Snippets Groups Projects
Commit 6deb66b6 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

use same rules as for our own parser to  avoid any implicit rules on
.l and .y files (fixes compile pb on irix with sgi's old 'make')
parent ea598f7e
No related branches found
No related tags found
No related merge requests found
# $Id: Makefile,v 1.4 2005-06-03 17:32:29 geuzaine Exp $
# $Id: Makefile,v 1.5 2005-06-20 16:35:30 geuzaine Exp $
#
# Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
#
......@@ -28,8 +28,8 @@ CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE}
SRC = matheval.cpp\
node.cpp\
scanner.cpp\
parser.cpp\
scanner.yy.cpp\
parser.tab.cpp\
symbol_table.cpp\
xmath.cpp
......@@ -45,10 +45,9 @@ ${LIB}: ${OBJ}
${CXX} ${CFLAGS} -c $<
parser:
bison --output parser.cpp -pme -d parser.y
flex -oscanner.cpp -Pme scanner.l
if [ -r parser.cpp.h ]; then mv parser.cpp.h parser.h ; fi
if [ -r parser.hpp ]; then mv parser.hpp parser.h ; fi
bison --output parser.tab.cpp -pme -d parser.y
if [ -r parser.tab.cpp.h ]; then mv parser.tab.cpp.h parser.tab.hpp ; fi
flex -oscanner.yy.cpp -Pme scanner.l
clean:
rm -f *.o
......
File moved
File moved
......@@ -24,7 +24,7 @@
#include "common.h"
#include "node.h"
#include "parser.h"
#include "parser.tab.hpp"
#include "symbol_table.h"
#define YY_ALWAYS_INTERACTIVE 1
......
......@@ -16,11 +16,11 @@
#define yytext metext
#define yywrap mewrap
#line 20 "scanner.cpp"
#line 20 "scanner.yy.cpp"
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /cvsroot/gmsh/MathEval/scanner.cpp,v 1.7 2005-03-17 22:45:00 geuzaine Exp $
* $Header: /cvsroot/gmsh/MathEval/scanner.yy.cpp,v 1.1 2005-06-20 16:35:30 geuzaine Exp $
*/
#define FLEX_SCANNER
......@@ -455,7 +455,7 @@ char *yytext;
#include "common.h"
#include "node.h"
#include "parser.h"
#include "parser.tab.hpp"
#include "symbol_table.h"
#define YY_ALWAYS_INTERACTIVE 1
......@@ -472,7 +472,7 @@ extern char *matheval_input_string; /* String representing function. */
/* Read next max_size character from string into buffer. */
static int input_from_string (char *buffer, int max_size);
/* Token definitions. */
#line 476 "scanner.cpp"
#line 476 "scanner.yy.cpp"
/* Macros after this point can all be overridden by user definitions in
* section 1.
......@@ -626,7 +626,7 @@ YY_DECL
#line 52 "scanner.l"
#line 630 "scanner.cpp"
#line 630 "scanner.yy.cpp"
if ( yy_init )
{
......@@ -804,7 +804,7 @@ YY_RULE_SETUP
#line 108 "scanner.l"
ECHO;
YY_BREAK
#line 808 "scanner.cpp"
#line 808 "scanner.yy.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment