Advice on (learning) parsing

Started by
12 comments, last by Bordogg 18 years, 6 months ago
Quote:Original post by Bordogg
yacc stands for "yet another compiler compiler", it's used to compile a programming language grammar into a compiler. I don't think that will help.

Have you actually ever used YACC or a YACC like program? YACC is used to build parsers, and is certainly easier than writing your own parser.
Advertisement
Quote:Original post by SiCrane
Quote:Original post by Bordogg
yacc stands for "yet another compiler compiler", it's used to compile a programming language grammar into a compiler. I don't think that will help.

Have you actually ever used YACC or a YACC like program? YACC is used to build parsers, and is certainly easier than writing your own parser.


But boost::spirit is easier than YACC?
I gathered from spirit's documentation that in order of the complexity of the task one could even just use scanners or regular expressions for simple tasks and YACC for the more complex ones, like building a computer language. Spirit is useful for large projects but still relatively easy. Is that a correct overview?

I find boost::spirit useful for small parsers, but lex and yacc together a better tool for more complex things. In my experience, spirit is just a pain to debug.
Quote:Original post by SiCrane
Have you actually ever used YACC or a YACC like program? YACC is used to build parsers, and is certainly easier than writing your own parser.


I won't use it till next my next school semester when I take compiler construction. After that it'll probably be my best friend.

EDIT: Thanks for the info too, I was unaware that yacc built parsers in general, my understanding was its use was limited to compiler construction.
Imagination was given to man to compensate him for what he is not.A sense of humor was provided to console him for what he is.-Horace Walpole

This topic is closed to new replies.

Advertisement