lex & yaccThis book shows you how to use two Unix utilities, lex andyacc, in program development. These tools help programmers build compilers and interpreters, but they also have a wider range of applications.The second edition contains completely revised tutorial sections for novice users and reference sections for advanced users. This edition is twice the size of the first and has an expanded index.The following material has been added:
|
Contents
1 | |
Chapter 2 Using Lex | 25 |
Chapter 3 Using Yacc | 47 |
Chapter 4 A Menu Generation Language | 77 |
Chapter 5 Parsing SQL | 105 |
Chapter 6 A Reference for Lex Specifications | 143 |
Chapter 7 A Reference for Yacc Grammars | 175 |
Chapter 8 Yacc Ambiguities and Conflicts | 209 |
Appendix C Berkeley Yacc | 261 |
Appendix D GNU Bison | 267 |
Appendix E Flex | 269 |
Appendix F MKS lex and yacc | 279 |
Appendix G Abraxas lex and yacc | 281 |
Appendix H POSIX lex and yacc | 283 |
Appendix I MGL Compiler Code | 285 |
Appendix J SQL Parser Code | 299 |
Chapter 9 Error Reporting and Recovery | 233 |
Appendix A ATT Lex | 243 |
Appendix B ATT Yacc | 251 |
Appendix K SQL Parser Code | 323 |
Glossary | 331 |
Other editions - View all
Common terms and phrases
ambiguous grammars AMMSC AT&T lex AT&T yacc Berkeley yacc bison buffer Chapter char character character classes column_ref command line compiler cursor declaration default define define define definition section empty end-of-file error recovery example expr flex fprintf(yyout GNU Bison handle header file input file INTNUM keyword language left recursion lex and yacc lex specification lexer lexical analyzer lookahead macro match menu MKS lex MS-DOS non-terminal nonassoc NULLX oflex ofthe optional output parameter parse parse tree pattern pointer POSIX prec precedence preprocessor printf recursive reduce reduce/reduce conflict regular expression routine rules section scalar_exp scanner screen screen_name screen_terminator search_condition shift shift/reduce conflict Solution statement stmt subject verb object subroutines symbol table syntax error token UNIX unput variable verb versions of lex versions of yacc whitespace word y.output y.tab.h yacc grammar yacc parser yyerror yyin yylex yyout yyparse yytext yywrap