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

correct

parent 1991aad4
No related branches found
No related tags found
No related merge requests found
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -146,15 +146,15 @@ typedef union { ...@@ -146,15 +146,15 @@ typedef union {
#define tLoopSTL 393 #define tLoopSTL 393
#define tEndLoop 394 #define tEndLoop 394
#define tEndFacet 395 #define tEndFacet 395
#define tAFFECTPLUS 396 #define tAND 396
#define tAFFECTMINUS 397 #define tOR 397
#define tAFFECTTIMES 398 #define tNOTEQUAL 398
#define tAFFECTDIVIDE 399 #define tEQUAL 399
#define tAND 400 #define tAPPROXEQUAL 400
#define tOR 401 #define tAFFECTPLUS 401
#define tNOTEQUAL 402 #define tAFFECTMINUS 402
#define tEQUAL 403 #define tAFFECTTIMES 403
#define tAPPROXEQUAL 404 #define tAFFECTDIVIDE 404
#define tLESSOREQUAL 405 #define tLESSOREQUAL 405
#define tGREATEROREQUAL 406 #define tGREATEROREQUAL 406
#define tCROSSPRODUCT 407 #define tCROSSPRODUCT 407
......
%{ /* $Id: Gmsh.y,v 1.22 2000-12-07 01:03:38 geuzaine Exp $ */ %{ /* $Id: Gmsh.y,v 1.23 2000-12-07 01:14:30 geuzaine Exp $ */
#include <stdarg.h> #include <stdarg.h>
...@@ -109,6 +109,8 @@ void vyyerror (char *fmt, ...); ...@@ -109,6 +109,8 @@ void vyyerror (char *fmt, ...);
%type <i> BoolExpr %type <i> BoolExpr
%type <u> Color %type <u> Color
/* A VERFIFIER ! Je n'ai pas le bouquin sous les yeux */
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/* Operators (with ascending priority) : cf. C language */ /* Operators (with ascending priority) : cf. C language */
/* */ /* */
...@@ -116,10 +118,11 @@ void vyyerror (char *fmt, ...); ...@@ -116,10 +118,11 @@ void vyyerror (char *fmt, ...);
/* - UNARYPREC is a dummy terminal to resolve ambiguous cases */ /* - UNARYPREC is a dummy terminal to resolve ambiguous cases */
/* for + and - (which exist in both unary and binary form) */ /* for + and - (which exist in both unary and binary form) */
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
%left tAFFECT tAFFECTPLUS tAFFECTMINUS tAFFECTTIMES tAFFECTDIVIDE %left tAFFECT
%right '?' tDOTS %right '?' tDOTS
%left tAND tOR %left tAND tOR
%left tNOTEQUAL tEQUAL tAPPROXEQUAL %left tNOTEQUAL tEQUAL tAPPROXEQUAL
%left tAFFECTPLUS tAFFECTMINUS tAFFECTTIMES tAFFECTDIVIDE
%left '<' '>' tLESSOREQUAL tGREATEROREQUAL %left '<' '>' tLESSOREQUAL tGREATEROREQUAL
%left '+' '-' %left '+' '-'
%left '*' '/' '%' %left '*' '/' '%'
...@@ -708,29 +711,29 @@ Affectation : ...@@ -708,29 +711,29 @@ Affectation :
TheSymbol.val = $3; TheSymbol.val = $3;
List_Replace(Symbol_L,&TheSymbol,CompareSymbols); List_Replace(Symbol_L,&TheSymbol,CompareSymbols);
} }
| tSTRING tAFFECTPLUS FExpr tEND | tSTRING tPLUSPLUS tEND
{ {
TheSymbol.Name = $1 ; TheSymbol.Name = $1 ;
if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols))) if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols)))
vyyerror("Unknown Variable '%s'", $1) ; vyyerror("Unknown Variable '%s'", $1) ;
else else
pSymbol->val += $3 ; pSymbol->val += 1. ;
} }
| tSTRING tAFFECTMINUS FExpr tEND | tSTRING tMINUSMINUS tEND
{ {
TheSymbol.Name = $1 ; TheSymbol.Name = $1 ;
if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols))) if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols)))
vyyerror("Unknown Variable '%s'", $1) ; vyyerror("Unknown Variable '%s'", $1) ;
else else
pSymbol->val -= $3 ; pSymbol->val -= 1. ;
} }
| tSTRING tPLUSPLUS FExpr tEND | tSTRING tAFFECTPLUS FExpr tEND
{ {
TheSymbol.Name = $1 ; TheSymbol.Name = $1 ;
if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols))) if (!(pSymbol = (Symbol*)List_PQuery(Symbol_L, &TheSymbol, CompareSymbols)))
vyyerror("Unknown Variable '%s'", $1) ; vyyerror("Unknown Variable '%s'", $1) ;
else else
pSymbol->val += 1. ; pSymbol->val += $3 ;
} }
| tSTRING tAFFECTMINUS FExpr tEND | tSTRING tAFFECTMINUS FExpr tEND
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.22 2000-12-07 01:03:39 geuzaine Exp $ * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.23 2000-12-07 01:14:30 geuzaine Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment