mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-20 02:42:56 +00:00
Lemon update 2010-02-17 20:31:32 on branch lemon-update-2010
- Report error if the grammar has multiple %type lines for the same nonterminal.
This commit is contained in:
parent
3d7a8e8348
commit
54ff482d8f
1 changed files with 14 additions and 4 deletions
|
@ -2291,10 +2291,20 @@ to follow the previous rule.");
|
||||||
psp->errorcnt++;
|
psp->errorcnt++;
|
||||||
psp->state = RESYNC_AFTER_DECL_ERROR;
|
psp->state = RESYNC_AFTER_DECL_ERROR;
|
||||||
}else{
|
}else{
|
||||||
struct symbol *sp = Symbol_new(x);
|
struct symbol *sp = Symbol_find(x);
|
||||||
psp->declargslot = &sp->datatype;
|
if((sp) && (sp->datatype)){
|
||||||
psp->insertLineMacro = 0;
|
ErrorMsg(psp->filename,psp->tokenlineno,
|
||||||
psp->state = WAITING_FOR_DECL_ARG;
|
"Symbol %%type \"%s\" already defined", x);
|
||||||
|
psp->errorcnt++;
|
||||||
|
psp->state = RESYNC_AFTER_DECL_ERROR;
|
||||||
|
}else{
|
||||||
|
if (!sp){
|
||||||
|
sp = Symbol_new(x);
|
||||||
|
}
|
||||||
|
psp->declargslot = &sp->datatype;
|
||||||
|
psp->insertLineMacro = 0;
|
||||||
|
psp->state = WAITING_FOR_DECL_ARG;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WAITING_FOR_PRECEDENCE_SYMBOL:
|
case WAITING_FOR_PRECEDENCE_SYMBOL:
|
||||||
|
|
Loading…
Reference in a new issue