0
votes

lex and yacc are supposed to be used together.

Which ones is the scanner and which one is the parser?

Which one creates a scanner and which one creates a parser?

2
Seriously? You couldn't just, you know, check the manpage?Chris Lutz
This stuff is kind of confusing so I need a live brain to verify me.neuromancer
Wow, are you actually cheating on your final exam via StackOverflow? You've asked questions on lex and yacc before that were significantly more practical, so I'm forced to conclude that you just have no idea what you're doing and are diluting the value of a compsci degree for the rest of us.Cory Petosky

2 Answers

5
votes

Lex (flex) is the lexical scanner. Yacc (bison) is the LALR parser generator.

3
votes

You will find that Wikipedia has excellent answers on all of these software tools and will explain them clearly and concisely. It's often the best place to start when you want a clear answer to a standard question. Here is http://en.wikipedia.org/wiki/Lex_(software)

In computer science, lex is a program that generates lexical analyzers ("scanners" or "lexers").[1] Lex is commonly used with the yacc parser generator.

And there is a lot more