Generated illegal initialization constants.
This commit is contained in:
parent
f408948925
commit
a0897e2ed3
|
@ -200,22 +200,22 @@ instruction_list(int *n;) :
|
||||||
;
|
;
|
||||||
|
|
||||||
instruction(int opt;)
|
instruction(int opt;)
|
||||||
{ int count;} :
|
{ int count = 0;} :
|
||||||
opcode(opt)
|
opcode(opt)
|
||||||
{ if (strcmp(buf,"ANY") != 0) {
|
{ if (strcmp(buf,"ANY") != 0) {
|
||||||
fprintf(genc,"\t{\"%s\"",buf);
|
fprintf(genc,"\t{\"%s\", {",buf);
|
||||||
}
|
}
|
||||||
else fputs("\t{(char *) 0",genc);
|
else fputs("\t{(char *) 0, {",genc);
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
[
|
[
|
||||||
operand
|
operand(' ')
|
||||||
{ count = 1;}
|
{ count = 1;}
|
||||||
[
|
[
|
||||||
OPERAND_SEPARATOR
|
OPERAND_SEPARATOR
|
||||||
{ count++;}
|
{ count++;}
|
||||||
SPACE*
|
SPACE*
|
||||||
operand
|
operand(',')
|
||||||
]*
|
]*
|
||||||
{ if (count > maxoperand) {
|
{ if (count > maxoperand) {
|
||||||
error("Too many operands");
|
error("Too many operands");
|
||||||
|
@ -223,9 +223,10 @@ instruction(int opt;)
|
||||||
}
|
}
|
||||||
]?
|
]?
|
||||||
{ while (count++ < maxoperand) {
|
{ while (count++ < maxoperand) {
|
||||||
fputs(",{\"\",-1,\"\"}",genc);
|
fprintf(genc,"%c{\"\",-1,\"\"}",count == 1 ? ' ' : ',');
|
||||||
}
|
}
|
||||||
putc('}',genc);
|
putc('}',genc);
|
||||||
|
putc('}',genc);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -244,9 +245,9 @@ opcode(int opt;)
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
operand
|
operand(int c;)
|
||||||
{ register struct symtab *p = 0;} :
|
{ register struct symtab *p = 0;} :
|
||||||
{ fputs(",{\"",genc);}
|
{ fprintf(genc, "%c{\"", c);}
|
||||||
[
|
[
|
||||||
identifier
|
identifier
|
||||||
{ if (!p) {
|
{ if (!p) {
|
||||||
|
|
Loading…
Reference in a new issue