Next
Previous Contents
Lex and YACC primer/HOWTO
PowerDNS BV (bert hubert <
[email protected]
>)
v0.8 $Date: 2002/04/20 19:46:46 $
This document tries to help you get started using Lex and YACC
1.
Introduction
1.1 What this document is NOT
1.2 Downloading stuff
1.3 License
2.
What Lex & YACC can do for you
2.1 What each program does on its own
3.
Lex
3.1 Regular expressions in matches
3.2 A more complicated example for a C like syntax
3.3 What we've seen
4.
YACC
4.1 A simple thermostat controller
4.2 Expanding the thermostat to handle parameters
4.3 Parsing a configuration file
5.
Making a Parser in C++
6.
How do Lex and YACC work internally
6.1 Token values
6.2 Recursion: 'right is wrong'
6.3 Advanced yylval: %union
7.
Debugging
7.1 The state machine
7.2 Conflicts: 'shift/reduce', 'reduce/reduce'
8.
Further reading
9.
Acknowledgements & Thanks
Next
Previous Contents