Авторизация
Поиск по указателям
Levine J.R., Manson T., Brown D. — Lex & Yacc
Обсудите книгу на научном форуме
Нашли опечатку? Выделите ее мышкой и нажмите Ctrl+Enter
Название: Lex & Yacc
Авторы: Levine J.R., Manson T., Brown D.
Аннотация: This book shows programmers how to use two UNIX utilities, lex and yacc, in program development. lex and yacc are tools that 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:
* Each utility is explained in a chapter that covers basic usage and simple, stand-alone applications
* How to implement a full SQL grammar, with full sample code
* Major MS-DOS and UNIX versions of lex and yacc are explored in-depth, including AT&T lex and yacc, Berkeley yacc, Berkeley/GNU Flex, GNU Bison, MKS lex and yacc, and Abraxas PCYACC
Язык:
Рубрика: Руководства по программному обеспечению /
Статус предметного указателя: Готов указатель с номерами страниц
ed2k: ed2k stats
Издание: 2nd edition
Год издания: 1992
Количество страниц: 366
Добавлена в каталог: 10.12.2005
Операции: Положить на полку |
Скопировать ссылку для форума | Скопировать ID
Предметный указатель
Character codes, lex 167
Character codes, yacc 194
Character fetch routine 158
Character ranges, counted repetitions of 149
Character ranges, matching 28
Character translations 151
Character translations in flex 151
Character values 257
Characters, counting 34
characters, illegal 283
Checking SQL syntax 114
Circumflex(^), in regular expressions 28 152 167 169
COBOL 294
Code section see “User subroutines section”
Collating symbol 170
Colon (:), in yacc rules 56 200
Columns, in SQL 110
Combined parsers 206
COMMAND m MGL 82—83 86 99
Command-driven interfaces 83
Command-line parsing 38
Comments 172
Comments in lex definition section 147
Comments in lex rules section 148
Comments in SQL 114
Comments in yacc 182 266
Comments, C 4 18 24 158
Comments, matching C 45—47
Comments, starting with # 31
Comments, unterminated in lex 257
Comments, unterminated in yacc 266 274
Compilers 334
Compilers, error recovery 251—253
Compilers, MGL 81
Compiling, lexers 22 27
Compiling, parsers 22 59
Complex patterns, building 29 169
Compound statements, C 33
Compression, table 283
Conditions, start see “Start states”
conflicts 60 184 217 334
Conflicts in y.output 221—227 223
Conflicts, %prec 276
Conflicts, associativity and 194
Conflicts, avoiding 196
Conflicts, embedded actions and 183
Conflicts, error messages 277
Conflicts, expecting 280
Conflicts, lookahead and 221 237—238
Conflicts, non-terminals in reduce/reduce 224
Conflicts, precedence and 194 276
Conflicts, recursion and 229
Conflicts, reduce/reduce 185 219—220 228 336
conflicts, resolving 62 233—240
Conflicts, shift/reduce 185 220 228—229 337
Context sensitivity, in lex 152
Context, yacc feedback to lex 191
Copies, matching 28—29 168
Copying tokens 87
coroutines 17
Counted repetitions of character ranges 149
Counting, characters 34
Counting, lines 34
Counting, words 32
Ctype macros in POSLX 170
Curly braces ({}) in lex actions 33 148
Curly braces ({}) in regular expressions 28 33 153 168
Curly braces ({}) in yacc actions 58 200
Curly braces ({}), missing 284
Current lex statistics 159
Current lexer state 155
Current token, in lex error reporting 246
Curses library 81
Cursor definitions for SQL 126—127
Dangling else 196
Danglmg-else conflict 63
Dash (-), in regular expressions 28
Data bases 110
Data bases, relational 109
Data definitions 33
dBASE 292 294
debugging, breakpoints 292
Debugging, flex 283
Debugging, generating code in flex 282
Debugging, including code 263
Debugging, including runtime code 296
Debugging, interactively 292
Debugging, single-stepping 292
Debugging, yacc parsers 213
Decimal numbers, lex specification for 31
Decimal numbers, matching 30
Declaration section see “Definition section”
Declarations in yacc definition section 199
Declarations, %type 204
Declarations, %union 205
Declarations, invalid 258
Declared patterns see “Substitutions”
Declaring, lex variables 148
Declaring, literal tokens in AT&T yacc 187
Declaring, non-terminal symbols with types 66
Declaring, operators 195
Declaring, precedence 62—63
Declaring, start states 43 172
Declaring, start symbols 57
Declaring, token precedence twice 269
Declaring, token types twice 271
Declaring, tokens 56
Declaring, unions 66
Default, lex action 6 154
Default, lex pattern 148
Default, lex start state 149
Default, rules in flex 283
Default, state 43
Default, yacc action 183
Defined patterns see “Substitutions”
defining variables 33
Definition section of SQL parser 119
Definition section, %{in yacc 192
Definition section, C code in lex 161
Definition section, comments in yacc 182
Definition section, lex 4 32 147
Definition section, missing in yacc 266
Definition section, yacc 18 56 182 192
definitions 33 33 153
Definitions, errors in 257 260
DELETE statement in SQL 131
Delimiters, C code 4 18
Delimiters, section 33
Detecting syntax errors 215
DIGITS 30
Disambiguating rules, lex 6
Discarding lookahead tokens 213
Dollar sign ($) in regular expressions 28 153 169
Dollar sign ($) in yacc actions 58 183 199
Double quotation marks see “Quotation marks”
Duplicate names 246
EBCDIC 167 194 334
echo 6 154
ECHO, default pattern in lex 148
ECHO, redefining 165
Either of two regular expressions 29 169
Embedded actions in anonymous rules 188
Embedded actions in yacc rules 183
Embedded actions, $< in 184
Embedded actions, conflicts 183
Embedded actions, symbol types for 184
Embedded actions, values of 184
Embedded SQL 113 139
Embedded SQL preprocessor 141 145
Embedded SQL preprocessor, EXEC SQL 143
Embedded SQL preprocessor, lexer for 141
Embedded SQL preprocessor, start states 142
Embedded SQL preprocessor, text support routines 144
Empty rules section 275
End marker 188
End of file, errors 274
End of file, in flex 282
End of file, in lex 179 256
End of file, inside comment 257
End of file, matching in flex 169
End of line, characters 167
End of line, matching 28 153 169
End-of-file processing, lex 35
End-of-file processing, MGL 102
End-of-input token 15 59
End-of-screen processing in MGL 101
Ending rules 56
End_file() 102
English grammar 3
Enlarging token buffer 178
Enlarging yytext 178
Entry point for lex lexers 175
Entry point for yacc parsers 216
EOF as token name 124
Equal sign (=), before yacc actions 184 200
Equivalence class 170
Error checking in SQL lexer 118
Error handling in yacc versions 193
Error handling, bugs in yacc 186
Error messages, AT&T lex 256—261
Error messages, AT&T yacc 264—271
Error messages, Berkeley yacc 273—277
Error messages, flex 283—287
Error recovery, compiler 251
Error recovery, extended in pcyacc 293
Error recovery, when necessary 247
Error recovery, yacc 188 213—214 216 248
Error reporting, lex 246
Error reporting, yacc 215
Error routine, yacc 60
Error rule 19 243
Error symbol 181
Error token 188 243 248—249
Error token, placement 251
Errors, %c language choice 259
Errors, %prec without non-terminal 268
Errors, %r language choice 259
Errors, %start 264
Errors, %type 264
Errors, %unions 274
Errors, %used or %unused 284—285
Errors, actions 257 264
Errors, cascading 249
Errors, character classes 260
Errors, character out of range in lex 257
Errors, characters used twice in lex 257
Errors, conflicting %precs 276
Errors, conflicts 277
Errors, declaring token precedence twice 269
Errors, default action with unmatched types 277
Errors, definitions 257 260
Errors, empty rules section 275
Errors, end of file in lex actions 256
Errors, end of file in yacc 274
Errors, end of file inside comment 257
Errors, extra slash 258
Errors, first rule 265
Errors, illegal characters in flex 283
Errors, illegal characters in yacc 267
Errors, illegal comments in yacc 266
Errors, illegal escape sequences 267 275
Errors, illegal REJECT 285
Errors, illegal repeat counts 284
Errors, illegal reserved words 267
Errors, illegal<<EOF>> rules 285
Errors, in lex 149
Errors, invalid request 258
Errors, invalid value type 264
Errors, item too big 267
Errors, iteration ranges 258
Errors, lex.backtrack 285
Errors, lookahead in yacc 270
Errors, missing angle brackets 271
Errors, missing patterns 257
Errors, missing quotation marks 267—268
Errors, missing start symbol rule 276
Errors, missing symbol name after %prec 266
Errors, missing type for %token 268
Errors, missing types 275—276
Errors, missing yacc definition section 266
Errors, multiple <<EOF>> rules 285
Errors, non-terminal not denned 269
Errors, null characters in AT&T yacc 264
Errors, opening files 265 273
Errors, out of disk space 265
Errors, out of memory 258 260
Errors, out of yacc internal storage 270—271 274
Errors, overly complex states 260
Errors, reading files 256 285
Errors, recovery 247—253
Errors, recursion 268
Errors, redeclaring start conditions 285
Errors, redeclaring start symbols 276
Errors, redeclaring token numbers 276
Errors, redeclaring token types 271
Errors, redeclaring types 276
errors, reporting 243—247
Errors, reserved symbols in yacc 275
Errors, right contexts 260
Errors, rules never reduced 264 269 277
Errors, rules without return value 268
Errors, start conditions 259 261 284
Errors, start symbols 275
Errors, strings 259
Errors, substitutions 257—259 283—284
Errors, tokens on left-hand side 270 275
Errors, too many states 261
Errors, too many terminals in yacc 270
Errors, too many transitions 261
Errors, too many yacc rules 268
Errors, translation tables 257 284
Errors, undeclared start states 285
Errors, undeclared types 268
Errors, undefined non-terminal symbols 277
Errors, undefined start states 261
Errors, undefined substitutions 284
Errors, unknown lex option 261
Errors, unrecognized directive 283
Errors, unterminated %union 266 274
Errors, unterminated actions 264 275 284
Errors, unterminated comments 266 274
Errors, unterminated patterns 284
Errors, unterminated strings 244 258 266 274
Errors, unterminated type names 271
Errors, value references 275—276
Errors, writing files 256
Errors, yacc options 267
Errors, yacc temporary files 269
escape sequences see “C escape sequences”
Exclusive start states 45 166 172
Exclusive start states, simulating 173
EXEC SQL 113 143
EXECUTE in MGL 84
Expanding #define 174
Expecting conflicts 280
Explicit associativity and precedence 62
Explicit start states 42
Explicit symbol types 202
Explicitly trailing context, in lex patterns 153
Exponents 30
Реклама