|a newbie's dumb question... firstname.lastname@example.org (2001-07-18)|
|Re: a newbie's dumb question... email@example.com (Vinay Kakade) (2001-07-23)|
|Re: a newbie's dumb question... firstname.lastname@example.org (Joachim Durchholz) (2001-07-23)|
|Re: a newbie's dumb question... email@example.com (2001-07-23)|
|Re: a newbie's dumb question... firstname.lastname@example.org (ThaFacka) (2001-07-23)|
|Re: a newbie's dumb question... email@example.com (2001-07-27)|
|Re: a newbie's dumb question... firstname.lastname@example.org (James Grosbach) (2001-07-30)|
|Date:||18 Jul 2001 19:59:20 -0400|
|Posted-Date:||18 Jul 2001 19:59:20 EDT|
I just strated to use lex and yacc to make a compiler for PICmicro
assembler. I have gathered enough materials for lex and yacc over the
internet. But I still don't have a slight idea of making a compiler
though. I've sort of done the lex part, creating token and stuff. But
I can't do the yacc part yet.
A friend of mine has done it for 68HC11. His compiler reads the whole
code first and stack it, then finds any errors. Is it a good way? Or
is there another way??
And the errors.. I spent a lot of hours to seek any clues about
error-checking. I found one compiler which had over 200 error
messages... I can only think of branch range errors, labeling errors
and nothing else. Can any of you give me some ideas??
Finally, parsers. I sort of understand that it's hierarchical and it
eventually comes down to the token that the lex makes. Is that all
there is to it? So am I just need to find the types of grammars (eg
opcode label, label opcode number)??
I know it's really basic and kind of dumb to ask these questions. But
please give me some hints or anything..
Return to the
Search the comp.compilers archives again.