|
|
|
@ -14,7 +14,6 @@
|
|
|
|
|
|
|
|
|
|
%{ |
|
|
|
|
#include <inttypes.h> |
|
|
|
|
#include <algorithm> |
|
|
|
|
#include "parser.h" |
|
|
|
|
#include "object.h" |
|
|
|
|
#include "globals.h" |
|
|
|
@ -104,7 +103,7 @@ line:
|
|
|
|
|
NAME ASSIGN object ENDL {COUT(DEBUG)<<" NAME ASSIGN object ENDL\n"; if(G_vars.count(*$1)!=0) delete G_vars[*$1]; G_vars[*$1]=$3; delete $1;} |
|
|
|
|
| NAME ASSIGN list ENDL {COUT(DEBUG)<<" NAME ASSIGN list ENDL\n"; if(G_vars.count(*$1)!=0) delete G_vars[*$1]; G_vars[*$1]=$3; delete $1;} |
|
|
|
|
| NAME OBRACE list CBRACE ENDL {COUT(DEBUG)<<" NAME OBRACE list CBRACE ENDL\n"; |
|
|
|
|
transform($1->begin(),$1->end(),$1->begin(),::tolower); |
|
|
|
|
tolower($1); |
|
|
|
|
ObjectList* ol=dynamic_cast<ObjectList*>($3); |
|
|
|
|
if(*$1=="save") G_tosave.push_back(ol); |
|
|
|
|
else if(*$1=="print") G_toprint.push_back(ol); |
|
|
|
@ -117,7 +116,7 @@ line:
|
|
|
|
|
} |
|
|
|
|
delete $1;} |
|
|
|
|
| NAME OBRACE object CBRACE ENDL {COUT(DEBUG)<<" NAME OBRACE object CBRACE ENDL\n"; |
|
|
|
|
transform($1->begin(),$1->end(),$1->begin(),::tolower); |
|
|
|
|
tolower($1); |
|
|
|
|
ObjectList* ol=new ObjectList($3); |
|
|
|
|
if(*$1=="save") G_tosave.push_back(ol); |
|
|
|
|
else if(*$1=="print") G_toprint.push_back(ol); |
|
|
|
|