Mail Archives: djgpp/2001/10/16/04:29:53
> To avoid that, you should supply an action for this
> rule, so Bison
> doesn't have to insert a "default action" for you:
>
> iunit: label {}
>
I'm afraid it doesn't work for me.
I also left out a part of the BSION-code.
This is the correct code:
iunit : label
| instr
| NOP
{instrcounter++;
}
;
label : /* empty */
{ $$[0] = '\0';
}
| LABEL
{ storeinstrlabel($1,LDEF);
strcopy($$, $1);
}
;
All names in CAPS are declared as Terminals.
Maybe you can give me some more advice?
And furthermore, I now have trouble with the commands
access and stat.
On my sparc everything runs fine, but on my PC these
commands return -1, and then my program exits.
What can I do about this?
Here is the code where things go wrong:
if (access(cnffilename, R_OK) != 0 ||
stat(cnffilename, &pathstatus) != 0 ||
(pathstatus.st_mode & S_IFMT) != S_IFREG) {
if (ERRNO != 0)
errorstatus= ERRNO;
else
errorstatus= EISDIR;
commer_handler(5, cnffilename);
}
Everything compiles correct, but when I run the
program, it terminates on a fault caused by both the
access and the stat command.
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
- Raw text -