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

restore old "Exit" behaviour

To abort a script, use "Abort"
parent 12d53be3
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,7 @@ string {alpha}({alpha}|{digit})* ...@@ -79,6 +79,7 @@ string {alpha}({alpha}|{digit})*
"<=" return tLESSOREQUAL; "<=" return tLESSOREQUAL;
">=" return tGREATEROREQUAL; ">=" return tGREATEROREQUAL;
Abort return tAbort;
Acos return tAcos; Acos return tAcos;
ArcCos return tAcos; ArcCos return tAcos;
Alias return tAlias; Alias return tAlias;
......
This diff is collapsed.
/* A Bison parser, made by GNU Bison 2.5. */ /* A Bison parser, made by GNU Bison 2.4.3. */
/* Bison interface for Yacc-like parsers in C /* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -147,33 +148,34 @@ ...@@ -147,33 +148,34 @@
tIf = 365, tIf = 365,
tEndIf = 366, tEndIf = 366,
tExit = 367, tExit = 367,
tField = 368, tAbort = 368,
tReturn = 369, tField = 369,
tCall = 370, tReturn = 370,
tFunction = 371, tCall = 371,
tShow = 372, tFunction = 372,
tHide = 373, tShow = 373,
tGetValue = 374, tHide = 374,
tGetEnv = 375, tGetValue = 375,
tGetString = 376, tGetEnv = 376,
tHomology = 377, tGetString = 377,
tCohomology = 378, tHomology = 378,
tGMSH_MAJOR_VERSION = 379, tCohomology = 379,
tGMSH_MINOR_VERSION = 380, tGMSH_MAJOR_VERSION = 380,
tGMSH_PATCH_VERSION = 381, tGMSH_MINOR_VERSION = 381,
tAFFECTDIVIDE = 382, tGMSH_PATCH_VERSION = 382,
tAFFECTTIMES = 383, tAFFECTDIVIDE = 383,
tAFFECTMINUS = 384, tAFFECTTIMES = 384,
tAFFECTPLUS = 385, tAFFECTMINUS = 385,
tOR = 386, tAFFECTPLUS = 386,
tAND = 387, tOR = 387,
tNOTEQUAL = 388, tAND = 388,
tEQUAL = 389, tNOTEQUAL = 389,
tGREATEROREQUAL = 390, tEQUAL = 390,
tLESSOREQUAL = 391, tGREATEROREQUAL = 391,
UNARYPREC = 392, tLESSOREQUAL = 392,
tMINUSMINUS = 393, UNARYPREC = 393,
tPLUSPLUS = 394 tMINUSMINUS = 394,
tPLUSPLUS = 395
}; };
#endif #endif
...@@ -183,7 +185,7 @@ ...@@ -183,7 +185,7 @@
typedef union YYSTYPE typedef union YYSTYPE
{ {
/* Line 2068 of yacc.c */ /* Line 1685 of yacc.c */
#line 92 "Gmsh.y" #line 92 "Gmsh.y"
char *c; char *c;
...@@ -196,8 +198,8 @@ typedef union YYSTYPE ...@@ -196,8 +198,8 @@ typedef union YYSTYPE
/* Line 2068 of yacc.c */ /* Line 1685 of yacc.c */
#line 201 "Gmsh.tab.hpp" #line 203 "Gmsh.tab.hpp"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
...@@ -119,7 +119,7 @@ struct doubleXstring{ ...@@ -119,7 +119,7 @@ struct doubleXstring{
%token tQuadTriDbl tQuadTriSngl tRecombLaterals tTransfQuadTri %token tQuadTriDbl tQuadTriSngl tRecombLaterals tTransfQuadTri
%token tText2D tText3D tInterpolationScheme tTime tCombine %token tText2D tText3D tInterpolationScheme tTime tCombine
%token tBSpline tBezier tNurbs tNurbsOrder tNurbsKnots %token tBSpline tBezier tNurbs tNurbsOrder tNurbsKnots
%token tColor tColorTable tFor tIn tEndFor tIf tEndIf tExit %token tColor tColorTable tFor tIn tEndFor tIf tEndIf tExit tAbort
%token tField tReturn tCall tFunction tShow tHide tGetValue tGetEnv tGetString %token tField tReturn tCall tFunction tShow tHide tGetValue tGetEnv tGetString
%token tHomology tCohomology %token tHomology tCohomology
%token tGMSH_MAJOR_VERSION tGMSH_MINOR_VERSION tGMSH_PATCH_VERSION %token tGMSH_MAJOR_VERSION tGMSH_MINOR_VERSION tGMSH_PATCH_VERSION
...@@ -2640,6 +2640,10 @@ Command : ...@@ -2640,6 +2640,10 @@ Command :
Free($2); Free($2);
} }
| tExit tEND | tExit tEND
{
Msg::Exit(0);
}
| tAbort tEND
{ {
gmsh_yyerrorstate = 999; // this will be checked when yyparse returns gmsh_yyerrorstate = 999; // this will be checked when yyparse returns
YYABORT; YYABORT;
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment