aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-gr.y
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-15 19:21:48 +0300
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit78b198cee9920e62ea19879959316b426fe1834c (patch)
tree8045537b4f555a671a7919b792bdaf06ca7b6f17 /engines/director/lingo/lingo-gr.y
parent5f0f0193f921008bf2deb5e249e40936aada8483 (diff)
downloadscummvm-rg350-78b198cee9920e62ea19879959316b426fe1834c.tar.gz
scummvm-rg350-78b198cee9920e62ea19879959316b426fe1834c.tar.bz2
scummvm-rg350-78b198cee9920e62ea19879959316b426fe1834c.zip
DIRECTOR: Lingo: Added support for parameter-less built-ins
Diffstat (limited to 'engines/director/lingo/lingo-gr.y')
-rw-r--r--engines/director/lingo/lingo-gr.y11
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 9bdb29ed39..15c6c686b6 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -60,7 +60,7 @@ extern int yyparse();
using namespace Director;
void yyerror(char *s) {
g_lingo->_hadError = true;
- warning("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
+ error("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
}
@@ -79,7 +79,7 @@ void yyerror(char *s) {
%token<i> INT
%token<e> THEENTITY THEENTITYWITHID
%token<f> FLOAT
-%token<s> BLTIN ID STRING HANDLER
+%token<s> BLTIN BLTINNOARGS ID STRING HANDLER
%token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO
%token tMCI tMCIWAIT tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO
%token tWITH tWHILE tNLELSE tFACTORY tMETHOD
@@ -352,6 +352,9 @@ expr: INT {
$$ = g_lingo->code1(g_lingo->_builtins[*$1]->func);
delete $1; }
+ | BLTINNOARGS {
+ $$ = g_lingo->code1(g_lingo->_builtins[*$1]->func);
+ delete $1; }
| ID '(' arglist ')' {
$$ = g_lingo->code1(g_lingo->c_call);
g_lingo->codeString($1->c_str());
@@ -402,8 +405,8 @@ func: tMCI STRING { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString($2->c_
| tMCIWAIT ID { g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString($2->c_str()); delete $2; }
| tPUT expr { g_lingo->code1(g_lingo->c_printtop); }
| gotofunc
- | tEXIT { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
- g_lingo->code1(g_lingo->c_procret); }
+ | tEXIT { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
+ g_lingo->code1(g_lingo->c_procret); }
| tGLOBAL globallist
;