mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-23 12:32:07 +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->state = RESYNC_AFTER_DECL_ERROR;
|
||||
}else{
|
||||
struct symbol *sp = Symbol_new(x);
|
||||
psp->declargslot = &sp->datatype;
|
||||
psp->insertLineMacro = 0;
|
||||
psp->state = WAITING_FOR_DECL_ARG;
|
||||
struct symbol *sp = Symbol_find(x);
|
||||
if((sp) && (sp->datatype)){
|
||||
ErrorMsg(psp->filename,psp->tokenlineno,
|
||||
"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;
|
||||
case WAITING_FOR_PRECEDENCE_SYMBOL:
|
||||
|
|
Loading…
Reference in a new issue