The Fictioning Horror Sale
 
 

Recently Viewed clear list


Original Essays | Yesterday, 10:00am

Lois Leveen: IMG Forsooth Me Not: Shakespeare, Juliet, Her Nurse, and a Novel



There's this writer, William Shakespeare. Perhaps you've heard of him. He wrote this play, Romeo and Juliet. Maybe you've heard of it as well. It's... Continue »
  1. $18.19 Sale Hardcover add to wish list

    Juliet's Nurse

    Lois Leveen 9781476757445

spacer
Qualifying orders ship free.
$14.50
Used Trade Paper
Ships in 1 to 3 days
Add to Wishlist
Qty Store Section
1 Beaverton Unix- Linux
3 Burnside - Bldg. 2 Unix- Unix and Linux Programming

Lex & Yacc 2ND Edition

by

Lex & Yacc 2ND Edition Cover

ISBN13: 9781565920002
ISBN10: 1565920007
Condition: Standard
All Product Details

 

 

Excerpt

: (colon), in yacc rules, 56, 200 # (sharp sign), delimited comments, 31 #define, 174 #include, 161 #line, omitting, 263, 283, 296 $ (dollar sign), in regular expressions, 28, 153, 169 in yacc actions, 58, 183, 199 $$, 58, 183 $0, 189 $<, in embedded actions, 184 in yacc actions, 200 in yacc, 190, 202 $end, 188 % (percent sign), %% section delimiter, 33, 199 in yacc token declarations, 56 %%, 5, 18, 33, 147, 181, 199 missing in yacc, 266 %2, in yacc definitions, 195 %<, in yacc definitions, 195 %a, in lex definition section, 159 %array, in POSIX lex %c language choice, 259 %e, in lex definition section, 159 %expect, 280 %guard, 280 %ident, 189 %k, in lex definition section, 159 %left, 62, 66, 195, 201, 203, 205 %n, in lex definition section, 159 %nonassoc, 62, 66, 195, 201, 203, 205 %o, in lex definition section, 159 %p, in lex definition section, 159 %pointer, in POSIX lex %prec, 63, 199 conflicting, 276 missing symbol name, 266 quirks in, 187 without non-terminal, 268 %pure_parser, 210, 280 %r language choice, 259 %right, 62, 66, 195, 201, 203, 205 %s, in lex, 172 %semantic_parser, 280 %start, 57, 201 errors, 264 redeclaring, 276 %T, 151, 257, 335 %token, 201-205 no type specified, 268 %type, 66, 201, 204 errors, 264 %union, 66, 205 too many, 274 unterminated, 266, 274 %unused, 284-285 %used, 284-285 %x, in lex, 172 %{, in flex, 282 in lex, 4, 161 in yacc, 18, 192, 200 () (parentheses), in regular expressions, 29, 169 x (asterisk), in regular expressions, 28, 168 + (plus), in regular expressions, 29, 168 - (dash), in regular expressions, 28 / (slash), in regular expressions, 29, 149, 153, 169, 260 /x, in yacc definition section, 182 ; (semicolon), in yacc rules, 56, 198, 200 <<EOF>>, 155, 169 illegal, 285 in flex, 282 <> (angle brackets), in lex rules, 43, 172 in regular expressions, 169 in yacc actions, 200 in yacc declarations, 66 missing around types, 271 = (equal sign), before yacc actions, 184, 200 ? (question mark), in regular expressions, 29, 168 @B, 280 [] (square brackets), in POSIX, 170 in regular expressions, 28, 167 . (period), in regular expressions, 28, 167 in y.output, 224 in yacc, 200 \ (backslash), in regular expressions, 28, 168 in yacc, 199 ^ (circumflex), in regular expressions, 28, 152, 167, 169 _ (underscore), in y.output, 224 in yacc, 200 `' (single quotes), in yacc, 192, 200 {} (curly braces), in lex actions, 33, 148 in regular expressions, 28, 33, 153, 168 in yacc actions, 58, 200 missing, 284 | (vertical bar), after lex patterns, 5, 148 in regular expressions, 29, 169 in yacc rules, 52, 199-200 A Abraxas, differences from AT&T, 293 extended error recovery, 293 new features, 293 pclex, 156-157 Software, 293 ACTION in MGL, 82, 84, 99 action table overflow, 264 actions, 333 %{ in flex, 282 | in lex, 5 {} in lex, 33 $ in yacc, 58, 183 $< in yacc, 190 @B in, 280 C code in yacc, 200 C compound statements in lex, 33 default lex, 6, 154 default yacc, 58, 183 ECHO, 6 embedded in yacc rules, 183 lex, 5 missing yacc, 266 multiple lines in lex, 148 referring to left-hand side in yacc, 58, 183 referring to right-hand side in yacc, 58, 183 types of inherited attributes in, 190 unterminated flex, 284 unterminated yacc, 264, 275 value references in yacc, 199 within yacc rules, 183 without patterns, 257 yacc, 19, 58, 182, 199 yyerrok in yacc, 249 alphabetic strings, matching, 6 alphabets, 333 alternatives, overlapping, 238-240 ambiguities in y.output, 223 ambiguous, grammars, 55, 60, 184, 194, 333 lookahead, 149 AMMSC, 117, 132 angle brackets (<>), in lex rules, 43, 172 in regular expressions, 169 in yacc actions, 200 in yacc declarations, 66 missing around types, 271 anonymous rules, with embedded actions, 188 ANSI standards for SQL, 109 any character, 28, 167 apostrophe ('), in yacc, 192, 200 appending tokens, 177 arithmetic expressions, parsing, 60, 132 ASCII, 28, 167, 170, 194, 203, 333 assigning precedence, 62 assigning token numbers, 66 assignments in yacc rules, 56, 200 associative operators, 195 associativity, 61-62 for avoiding conflicts, 196 in yacc, 195 asterisk (x), in regular expressions, 28, 168 atof(), 67 AT&T lex, 38, 41, 255-261 bugs, 140, 149 character codes, 151 command line, 255-256 error messages, 256-261 faster translation, 256 input(), 155-156 internal tables, 159 library, 256 macro wrappers, 174 options, 255-256 output in C, 255 output in RATFOR, 255 standard output, 255 start states, 172 statistical summary, 255 translation tables, 167 with no summary lines, 255 yytext, 177-178 AT&T yacc, 263-271 command line, 263 declaring literal tokens, 187 error handling, 186 error messages, 264-271 generating header files, 263 generating y.output, 263 including runtime debugging code, 263 number of symbolic tokens, 193 omitting #line, 263 options, 263 prefix for generated files, 207 recursive parsing in, 209 ATTRIBUTE in MGL, 82, 91, 100 attributes, inherited, 189 synthesized, 189 automaton, 336 B backslash (\), in regular expressions, 28, 168 in yacc, 199 backtracking, 282 Backus-Naur Form, 109, 334 bad states, 256 bad transitions, 256 base tables in SQL, 122 BEGIN, 149, 171-172 beginning of line, matching, 28, 152, 169 Berkeley Software Distribution, 336 Berkeley yacc, 22, 273-277 error messages, 273-277 fatal errors, 273 %ident, 189 Makefiles for, 77 options, 273 recursion, 187, 197 SQL parser, 140 -b flag, in Berkeley yacc, 273 in flex, 282 in POSIX yacc, 295 bison, 22, 279 differences from AT&T, 279 generated header filename, 203 generated prefix names, 207 Makefiles for, 78 options, 280 reentrant parsers, 193, 210 reference manual, 341 BNF, 109, 334 breakpoints, 292 BSD, 334 buffers, lex, 32, 85 sizes in lex, 166 yacc, 267 BUFSIZ, as token name bugs, in lex, 149-150 in yacc, 186-188 building complex patterns, 29, 169 building lex and yacc, 21 building MGL compiler, 92 C C++, 282, 292, 294 C code, delimiters, 4, 18 in lex definition section, 161 in lex rules section, 148 in lex user subroutines section, 148 in lexers, 7, 34, 176 in yacc actions, 200 in yacc definition section, 182, 192 initial, 4 position in yylex(), 148 C comments, 4, 18, 24, 158, 172 matching, 45-47 C compound statements, 33 C escape sequences, illegal, 264, 267, 275 in regular expressions, 28, 168 matching, 28, 168 non-portable, 258 C header file, creating, 203 C language output of lexers, 255 C source code analyzers, 45 C source file, lex, 7 calculator, lexer for, 59, 65, 76 parser for, 58, 62, 64, 75 cascading errors, 249 case of token names, 182 case-insensitivity, in flex lexers, 283 cat, 2 cc, -ll flag, 160 -ly flag, 211 -C flag, in flex, 283, 285-286 -c flag, in AT&T lex, 255 in POSIX lex, 295 in yacc, 210 chaining files, 155 changing, input to lexer, 35 prefix for lex names, 162 prefix for yacc names, 207 start states, 149 states, 43 character classes, 28, 170 lex, 257 matching, 167 non-portable, 258 too many, 260 character codes, international, 170 lex, 167 yacc, 194 character fetch routine, 158 character ranges, counted repetitions of, 149 matching, 28 character translations, 151 in flex, 151 character values, 257 characters, counting, 34 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 in MGL, 82-83, 86, 99 command-line parsing, 38 command-driven interfaces, 83 comments, 172 C, 4, 18, 24, 158 in lex definition section, 147 in lex rules section, 148 in SQL, 114 in yacc, 182, 266 matching C, 45-47 starting with #, 31 unterminated in lex, 257 unterminated in yacc, 266, 274 compilers, 334 error recovery, 251-253 MGL, 81 compiling, lexers, 22, 27 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 associativity and, 194 avoiding, 196 embedded actions and, 183 error messages, 277 expecting, 280 in y.output, 221-227, 223 lookahead and, 221, 237-238 non-terminals in reduce/reduce, 224 %prec, 276 precedence and, 194, 276 recursion and, 229 reduce/reduce, 185, 219-220, 228, 336 resolving, 62, 233-240 shift/reduce, 185, 220, 228-229, 337 context, yacc feedback to lex, 191 context sensitivity, in lex, 152 copies, matching, 28-29, 168 copying tokens, 87 coroutines, 17 counted repetitions of character ranges, 149 counting, characters, 34 lines, 34 words, 32 ctype macros in POSIX, 170 curly braces ({}), in lex actions, 33, 148 in regular expressions, 28, 33, 153, 168 in yacc actions, 58, 200 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 D dangling else, 196 dangling-else conflict, 63 dash (-), in regular expressions, 28 data bases, 110 relational, 109 data definitions, 33 dBASE, 292, 294 debugging, breakpoints, 292 flex, 283 generating code in flex, 282 including code, 263 including runtime code, 296 interactively, 292 single-stepping, 292 yacc parsers, 213 decimal numbers, lex specification for, 31 matching, 30 declaration section, (see definition section) declarations, in yacc definition section, 199 invalid, 258 %type, 204 %union, 205 declared patterns, (see substitutions) declaring, lex variables, 148 literal tokens in AT&T yacc, 187 non-terminal symbols with types, 66 operators, 195 precedence, 62-63 start states, 43, 172 start symbols, 57 token precedence twice, 269 token types twice, 271 tokens, 56 unions, 66 default, lex action, 6, 154 lex pattern, 148 lex start state, 149 rules in flex, 283 state, 43 yacc action, 183 defined patterns, (see substitutions) defining variables, 33 definition section, %{ in yacc, 192 C code in lex, 161 comments in yacc, 182 lex, 4, 32, 147 missing in yacc, 266 of SQL parser, 119 yacc, 18, 56, 182, 192 definitions, 33, 33, 153 errors in, 257, 260 (see also substitutions) DELETE statement in SQL, 131 delimiters, C code, 4, 18 section, 33 detecting syntax errors, 215 -d flag, in AT&T yacc, 263 in flex, 282 in POSIX yacc, 295 in yacc, 203 digits, 30 disambiguating rules, lex, 6 discarding lookahead tokens, 213 dollar sign ($), in regular expressions, 28, 153, 169 in yacc actions, 58, 183, 199 double quotation marks, (see quotation marks) duplicate names, 246 E EBCDIC, 167, 194, 334 ECHO, 6, 154 default pattern in lex, 148 redefining, 165 8-bit characters, 285 8-bit clean lexers, 283 -8 flag, in flex, 283, 285 either of two regular expressions, 29, 169 embedded actions, $< in, 184 conflicts, 183 in anonymous rules, 188 in yacc rules, 183 symbol types for, 184 values of, 184 embedded SQL, 113, 139 embedded SQL preprocessor, 141, 145 EXEC SQL, 143 lexer for, 141 start states, 142 text support routines, 144 empty rules section, 275 end marker, 188 end of file, errors, 274 in flex, 282 in lex, 179, 256 inside comment, 257 matching in flex, 169 end of line, characters, 167 matching, 28, 153, 169 end_file(), 102 ending rules, 56 end-of-file processing, lex, 35 MGL, 102 end-of-input token, 15, 59 end-of-screen processing in MGL, 101 English grammar, 3 enlarging token buffer, 178 enlarging yytext, 178 entry point, for lex lexers, 175 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, bugs in yacc, 186 in yacc versions, 193 error messages, AT&T lex, 256-261 AT&T yacc, 264-271 Berkeley yacc, 273-277 flex, 283-287 error recovery, compiler, 251 extended in pcyacc, 293 when necessary, 247 yacc, 188, 213-214, 216, 248 error reporting, lex, 246 yacc, 215 error routine, yacc, 60 error rule, 19, 243 error symbol, 181 error token, 188, 243, 248-249 placement, 251 errors, actions, 257, 264 %c language choice, 259 cascading, 249 character classes, 260 character out of range in lex, 257 characters used twice in lex, 257 conflicting %precs, 276 conflicts, 277 declaring token precedence twice, 269 default action with unmatched types, 277 definitions, 257, 260 empty rules section, 275 end of file in lex actions, 256 end of file in yacc, 274 end of file inside comment, 257 extra slash, 258 first rule, 265 illegal characters in flex, 283 illegal characters in yacc, 267 illegal comments in yacc, 266 illegal <<EOF>> rules, 285 illegal escape sequences, 267, 275 illegal REJECT, 285 illegal repeat counts, 284 illegal reserved words, 267 in lex, 149 invalid request, 258 invalid value type, 264 item too big, 267 iteration ranges, 258 lex.backtrack, 285 lookahead in yacc, 270 missing angle brackets, 271 missing patterns, 257 missing quotation marks, 267-268 missing start symbol rule, 276 missing symbol name after %prec, 266 missing type for %token, 268 missing types, 275-276 missing yacc definition section, 266 multiple <<EOF>> rules, 285 non-terminal not defined, 269 null characters in AT&T yacc, 264 opening files, 265, 273 out of disk space, 265 out of memory, 258, 260 out of yacc internal storage, 270-271, 274 overly complex states, 260 %prec without non-terminal, 268 %r language choice, 259 reading files, 256, 285 recovery, 247-253 recursion, 268 redeclaring start conditions, 285 redeclaring start symbols, 276 redeclaring token numbers, 276 redeclaring token types, 271 redeclaring types, 276 reporting, 243-247 reserved symbols in yacc, 275 right contexts, 260 rules never reduced, 264, 269, 277 rules without return value, 268 %start, 264 start conditions, 259, 261, 284 start symbols, 275 strings, 259 substitutions, 257-259, 283-284 tokens on left-hand side, 270, 275 too many states, 261 too many terminals in yacc, 270 too many transitions, 261 too many yacc rules, 268 translation tables, 257, 284 %type, 264 undeclared start states, 285 undeclared types, 268 undefined non-terminal symbols, 277 undefined start states, 261 undefined substitutions, 284 %unions, 274 unknown lex option, 261 unrecognized directive, 283 unterminated actions, 264, 275, 284 unterminated comments, 266, 274 unterminated patterns, 284 unterminated strings, 244, 258, 266, 274 unterminated type names, 271 unterminated %union, 266, 274 %used or %unused, 284-285 value references, 275-276 writing files, 256 yacc options, 267 yacc temporary files, 269 escape sequences, (see C escape sequences) exclusive start states, 45, 166, 172 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 expression grammars, 63, 196, 229, 236 expressions, parsing, 52 regular (see regular expressions) extended error recovery library, 293 extensible languages, 94 external error recovery mechanisms, 251 extra slashes, 258 F failure value, 212 fast tables in flex, 283 faster AT&T lex translation, 256 F_BUFSIZ, 179 FETCH statement in SQL, 129 -F flag, in flex, 283, 285-286 -f flag, in AT&T lex, 256 in flex, 283, 285 FILE as token name, 124 file chaining, 155 filenames, for MGL, 95 parsing in lex, 39 files, opening, 273 finite automaton, 334 fixing conflicts, 233-240 flex, 166, 178, 281 buffers, 155, 177 bugs, 149-150 C++ and, 282 character translations, 151 compatibility, 22 differences from AT&T, 281-282 end of file, 282 <<EOF>> in, 169 error messages, 283-287 exclusive start states, 172 input, 38, 155, 157 libraries, 166, 281 Makefiles for, 77 multiple lexers in, 165 options, 282-283 patterns, 281 restarting, 171 -s flag, 154 scanning routine, 282 SQL lexer, 140 translation tables, 281 yywrap(), 179, 281 fopen, 95 foreign characters, 170 Fortran, 292, 294 Free Software Foundation, 279 full tables, in flex, 283 functions, hard-coding, 72 parsing, 71-72 G generated files, prefix for, 273, 295 generated header file, creating, 203, 295 yacc option, 263 generated symbols, prefix for, 292, 296 generating menus, (see MGL) generating yacc log files, 210 generating y.output, 263, 296 GNU, 279 GNU bison, (see bison) grammars, 2, 13, 52 ambiguous, 55, 60, 184, 194, 333 combined, 206 conflicts in, 184, 217 designing, 83 expression, 236 for calculator, 75 for MGL, 84-87, 89, 91 for SQL, 118, 120 IF-THEN-ELSE, 231, 233-235 multiple, 205, 207 nested list, 232-233, 235-236 portability of, 193 recursive, 88 redundant, 233 structure of, 56, 181 grep, 1, 167 groups of expressions, 29, 169, 260 guards, 280 H hand-written lexers, 22 hard-coding functions, 72 header files, generating, 203, 263, 295 in lex, 4, 161 hex character codes, 169 hiding menu items, 91 Hypertalk, 292, 294 I ID token in MGL, 87 identification string, 189 IEEE, 295 -I flag, in flex, 283, 286 -i flag, in flex, 283 IF-THEN-ELSE, 196, 231, 233-235 IGNORE in MGL, 84 illegal, characters, 267, 283 <<EOF>> rules, 285 REJECT, 285 repeat counts, 284 start conditions, 284 substitutions, 283-284 translation tables, 284 value references, 276 include file, 59 include operations, 154 including runtime debugging code, 296 including yacc library, 211 increasing size, lex internal table, 159 token buffer, 178 infinite recursion, 187 inherited attributes, 189 symbol types for, 190 INITIAL state, 149, 172 initialization code, for lexer, 148 initializing MGL, 95 input, 334 end of, 188 from strings, 156 pushing back, 173-174 redirecting, 95 input files, lex, 19 logical nesting, 155 input(), 38, 41, 151, 158 calling, 158 in flex, 282 redefining, 148, 155-156, 159 INSERT statement in SQL, 130 integers, 30 interactive debugger, 292 interchangeable function and variable names, 73 interfaces, designing, 83 internal stack, yacc, 53 internal tables, 159 international characters, 28, 170 interpreters, 335 interpretive lexers, 283 invalid requests, 258 INVISIBLE in MGL, 91 invisible menu items, 91 invoking MGL with filenames, 95 ITEM in MGL, 82, 85, 99 items rule in MGL, 88 iteration ranges, error in, 258 K keywords, in static tables, 93 L LALR, 335 languages, 335 left associative operators, 195 left associativity, 62 left context, in lex, 152 left-hand side, 52, 57, 198, 335 setting value of, 58, 183 tokens on, 270, 275 left-recursive grammars, 88, 197 length of tokens, 174 levels of precedence, 61 lex, %%, 147, 255, 335 %a in definition section, 159 actions, 5, 148 BEGIN, 149 beginning of line character, 152 buffers, 32, 85, 166 bugs, 149 C code in rules section, 148 character classes, 257 character codes, 167 character fetch routine, 158 comments, 147-148 context sensitivity, 152 current statistics, 159 default action, 6, 154 default start state, 149 definition section, 4, 32, 147 definitions, 153 disambiguating rules, 6 %e in definition section, 159 ECHO, 148, 154 end of file, 35, 179 end of line character, 153 error reporting, 244, 246 exclusive start states, 172 explicitly trailing context in patterns, 153 expression syntax, 167 include operations, 154 input file, 19 input from strings, 156 internal tables, 159 %k in definition section, 159 library, 77, 160 line numbers, 160 literal block, 161 lookahead, 38, 41, 153 main(), 160 multiple input files, 154 multiple lexers in one specification, 161 %n in definition section, 159 no match, 148 -o flag, 163 %o in definition section, 159 original description of, 342 output(), 165 overflowing buffers, 85 -p flag, 162 %p in definition section, 159 pattern-matching rules, 6 patterns, 27, 148, 167 (see also regular expressions) pcyacc scanner and parser, 294 porting lexers, 166 porting specifications, 166 prefix for names, 162 regular expressions, 167 REJECT, 170 renaming generated lexers, 163 renaming lex functions and variables, 162 rules, 5 rules section, 5, 33, 148 running, 21 %s, 172 sections of specifications, 147 specifications, 1, 27 start states, 42, 152, 171 structure of specifications, 32, 147 %T, 151 token buffer, 177 translations, 151 unput(), 173 user subroutines section, 7, 34, 148 -v flag, 159, 255 whitespace, 147-148 yyleng, 174 yyless(), 174 yylex(), 175 yylineno, 160 yymore(), 177 yytext, 174, 177 yywrap(), 179 (see also AT&T lex) lex.backtrack, 282, 285 lexers, 1, 27, 335 C source code for, 7, 21, 59 case-insensitive, 283 changing input to, 35 compiling, 27 end of input, 202 entry point (see yylex) for calculator, 59, 65, 76 for decimal numbers, 31 for embedded SQL preprocessor, 141 for MGL, 83-84, 92 for multiple grammars, 210 for SQL, 114, 328-331 initialization code, 148 input to, 35 interpretive, 283 porting, 166 reporting statistics, 283 restarting, 171 returning values from, 171 routine name, 7, 27 running, 27 skeletons, 283 8-bit clean, 283 lexical analysis, 1 lexical analyzers, (see lexers) lexical feedback, 191 lexical tokens, (see tokens) lexing, 1 lex, input(), 158 lex.yy.c, 7, 21, 59, 256 lex_yy.c, 291, 293 -L flag, in flex, 283 -l flag, in AT&T yacc, 263 in POSIX yacc, 296 LHS, 52, 335, 335 (see also left-hand side) libraries, AT&T lex, 256 Berkeley yacc, 273 curses, 81 extended error recovery in pcyacc, 293 flex, 281 lex, 77, 160, 179 math, 77 MKS lex, 292 POSIX yacc, 296 yacc, 77, 194, 211-212 limitations of yacc, 55 line numbers, in lex error reporting, 243 in lex input, 160 lines, counting, 34 linked lists, 198 linking, lex library, 160 lexers, 22 parsers, 22 listings, yacc, 210 literal block, lex, 161 yacc, 182, 192 literal text, matching, 29, 169 literal tokens, 192 and portability, 194 in yacc rules, 200 multiple character, 193 -ll flag, in cc, 160 location of error tokens, 251 log files, yacc, 210 logical nesting of input files, 155 logical or, in lex, 148 in regular expressions, 29, 169 in yacc rules, 52, 199-200 lookahead, 337 and conflicts, 237-238 conflicts, 221 discarding tokens, 213 errors in yacc, 270 lex, 38, 41, 153 yacc, 55 -ly flag, in cc, 211 M macros, (see substitutions) main(), 7, 18 in MGL lexer, 95-96 in MGL parser, 102 in SQL lexer, 118 lex library, 160 yacc library, 211 make program, 77 Makefiles, 77 for SQL syntax checker, 140 making parsers, 77 manipulating tables in SQL, 111 manipulation sublanguage in SQL, 128 matching, all except character classes, 28, 167 all except ranges of characters, 28, 167 alphabetic string, 6 any character, 28, 167 beginning of C comments, 46 beginning of line, 28, 169 C comments, 45 C escape sequences, 28, 168 character classes, 28, 167 comments starting with #, 31 decimal numbers, 30 digits, 30 either of two regular expressions, 29, 169 end of C comments, 47 end of file in flex, 169 end of line, 28, 169 escape sequences, 28 groups of expressions, 29, 169, 260 integers, 30 literal text, 29, 169 metacharacters, 28-29, 168-169 multiple occurrences, 28-29, 168 named patterns, 28 number of occurrences, 28, 168 numbers, 30 only in start states, 169 optional, 29, 168 quotation marks, 85 quoted strings, 31 ranges of characters, 28, 167 real numbers, 30 repetitions, 28, 168 single characters, 28, 167 substitutions, 168 whitespace, 45 zero or more occurrences, 28-29, 168 math library, 77 maximum numbers, of repetitions, 168 of symbolic tokens, 193 menu descriptions, processing, 97 menu generation language, (see MGL) menu-driven interfaces, 83 menus, (see MGL) metacharacters, 28, 167 matching, 28-29, 168-169 metalanguage, 28 MGL, 81-108 ACTION, 82, 84, 99 ATTRIBUTE, 82, 91, 100 building compiler, 92 COMMAND, 82-83, 86, 99 design, 83 END, 90 end-of-file processing, 102 end-of-screen processing, 101 enhancements, 106, 297 EXECUTE, 84 filenames for, 95 grammar, 84-87, 89, 91 hiding menu items, 91 ID token, 87, 97 IGNORE, 84 initialization code, 95 INVISIBLE, 91 invoking with filenames, 95 ITEM, 82, 85, 99 items rule, 88 lex source, 301-302 lexer, 83-84, 92 main() in lexer, 95-96 main() in parser, 102 menu description, 82 menu items, 82, 85 multiple screens, 89 multiple title lines, 89 multiple-level menus, 89 multiple-line items, 88 NAME, 82 naming screens, 90 parser, 84-87, 89, 91 post-processing, 95 processing menu descriptions, 97 program names, 84 QSTRING, 85, 98 qstring lexer rule, 85 quoted strings, 84 recursion, 88-89 sample input, 103 sample output, 103 SCREEN, 90, 97 screen names, 97 screen rules, 89, 97 start rule, 89 supporting C code, 302-310 terminating screens, 100 TITLE, 82, 88, 98 using, 102 VISIBLE, 91 yacc source, 297-301 mgl-code, 307-310 mgllex.l, 301-302 mglyac.c, 297-301 minimum number of repetitions, 168 missing, angle brackets, 271 curly braces, 284 patterns, 257 quotation marks, 267-268, 274, 284 types, 275-276 MKS lex, character codes, 151 current lexer state, 155 differences from AT&T, 291 input, 151, 157 internal tables, 159 library, 292 new features, 292 options, 292 restarting, 171 source, 291 translation tables, 167 yyRestoreScan(), 155 yySaveScan(), 155 yytext, 178 MKS yacc, differences from AT&T, 291 generated header file, 203 generated prefix names, 207 new features, 292 options, 292 source, 291 y.output, 227 Modula-2, 292, 294 module language for SQL, 112, 126 Mortice Kern Systems, 291 MS-DOS, 15, 22, 28, 164, 179, 203, 210, 291, 293 multiple, character literal tokens, 193 <<EOF>> rules, 285 files grammars in one program, 205, 207 input files, lex, 154 input tokens in SQL, 119 lexers in one lex specification, 161 occurrences, matching, 29, 168 patterns in lex, 148 screens in menus, 89 title lines in menus, 89 types of values, 65 multiple-level menus, 89 multiple-line lex actions, 148 multiple-line menu items, 88 N NAME in MGL, 82 named patterns, (see substitutions) names, duplicate, 246 for regular expressions (see substitutions) for screens in MGL, 90 for substitutions, 259 in SQL, 118 reused, 246 nested list grammars, 232-233, 235-236 nesting input files, 155 -n flag, in AT&T lex, 255 in POSIX lex, 295 no associativity, 62 no match in lex, 148 non-associative operators, 195 non-English alphabets, 28 non-portable character classes, 258 non-terminal symbols, 52, 182, 335 declaring types, 66 in reduce/reduce conflicts, 224 redeclaring types, 271 types, 204 undefined, 269, 277 NULL as token name, 124, 138 null characters, in AT&T yacc, 264 numbers, in regular expressions, 28 in SQL, 118-119 of occurrences, 28, 168 with exponents, 30 with unary minus, 30 O occurrences, matching, 28, 168 octal character codes, 169 null characters in, 264 -o flag in lex, 163 omitting #line, 263, 283, 296 opening files, errors, 265 operators, associative, 195 declarations, 195 in SQL, 119 optional, matching, 29, 168 options, Abraxas, 293 AT&T lex, 255-256 AT&T yacc, 263 Berkeley yacc, 273 bison, 280 flex, 282-283 illegal in yacc, 267 MKS lex and yacc, 292 pcyacc, 293 POSIX lex, 295 POSIX yacc, 295-296 or, in lex, 148 in regular expressions, 29, 169 in yacc rules, 52, 199-200 order of precedence, 195 OS/2, 291, 293 out of disk space, 265 out of memory, 258, 260 out of range, character value, 257 out of space, yacc, 269 output(), 165 redefining, 148, 154, 165 output, redirecting, 95 output files, yacc, 265 output language for lexer, 255 overflowing, lex buffers, 85 lex internal tables, 159 overlapping alternatives, 238-240 overlapping tokens, 170 P P1003.2 standard, 295 parentheses (), in regular expressions, 29, 169 parse trees, 52-53 multiple, 55 option, 293 passing values, 189 space for, 259 parsers, 2 C source code for, 59 communication with lexer, 14 compiling, 59 debugging, 213 for calculator, 58, 62, 64 for MGL, 84-87, 89, 91 for SQL, 118-120 making, 77 portability of, 194 recursive, 292 reentrant, 209, 280, 292 running, 59 semantic, 280 SQL definition section, 119 stack, 336 states, 221 synchronizing, 214 trace code in, 214 yacc routine name, 18 parsing, 1, 336 arithmetic expressions, 60 command lines, 38 functions, 71 lists, 197 multiple files, 35 quoted strings, 85 recursive, 209 shift/reduce, 53 using symbol tables, 72 Pascal, 292, 294 patterns, 5, 27-28, 148, 167, 336 {} in, 153 beginning of line patterns, 152 end of line patterns, 153 explicitly trailing context in, 153 in flex, 281 matching, 6, 149 substitutions in, 153 unterminated, 284 (see also regular expressions) pclex, (see pcyacc) PCYACC, 171, 178-179 pcyacc, 156-157, 293 differences from AT&T, 293 extended error recovery, 293 new features, 293 output filenames, 293 percent sign (%), %% section delimiter, 33, 199 in yacc token declarations, 56 performance, reporting in flex, 283 period (.), in regular expressions, 28, 167 in yacc, 200 in y.output, 224 -p flag, in flex, 283 in lex, 162 in POSIX yacc, 296 in yacc, 207 pic, 292, 294 placement of error tokens, 251 plus (+), in regular expressions, 29, 168 pointer models, 217-228 pointers, yacc, 217 portability, lex, 166 of grammars, 193 of lex specifications, 166 of lexers, 166 of parsers, 194 yacc, 193 position of erroneous tokens, 247 POSIX lex, 177 character codes, 170 differences, 296 input, 158 multiple lexers, 156 options, 295 square brackets in, 28 standard, 295 yytext in, 296 yywrap() in, 179, 296 POSIX yacc, differences, 296 generated header file, 203 generated prefix names in, 207 library, 296 options, 295-296 standard, 295 post-processing in MGL, 95 Postscript, 294 precedence, 61, 269, 336 assigning, 62 conflicting, 276 declaring, 62 for avoiding conflicts, 63, 196 in expression grammars, 196 in yacc rules, 195, 199 interchanging, 187 levels, 61, 195 redeclaring, 276 specifying, 61-62 table of, 62 prefix, for generated files, 273, 295 for generated symbols, 292, 296 primary key in SQL, 110 privilege definitions in SQL, 125 processing menu descriptions in MGL, 97 production rules, (see yacc rules) productions, (see yacc rules) program names, in MGL, 84 programs, 336 Prolog, 294 prototyping, xvii punctuation in SQL, 118 pushing input back, 41, 153, 173-174 Q QSTRING in MGL, 85, 98 qstring rule in MGL lexer, 85 queries in SQL, 111 question mark (?), in regular expressions, 29, 168 quirks in yacc, 187 quotation marks, in regular expressions, 29, 169 in yacc, 200 matching, 85 missing in flex, 284 missing in yacc, 267-268, 274 quoted characters in yacc, 192 quoted strings, 31 in MGL, 84 parsing, 85 unterminated, 244 quotes, (see quotation marks or single quotes) R ranges of characters, 28, 167 RATFOR, 255, 259, 269 reading files, errors, 256 real numbers, 30 recognizing words, 3 recovery, (see error recovery) recursion, 21, 53 conflicts and, 229 errors in, 268 in MGL grammar, 88-89 in SQL scalar function grammar, 133 in yacc, 197 infinite, 187 right, 222 recursive parsers, 209, 292 redeclaring, start conditions, 285 token precedence, 269 token types, 271 redefining, ECHO, 165 input(), 148 output(), 148, 165 unput(), 148, 173 reduce/reduce conflicts, 185, 219-220, 336 identifying, 223 in Berkeley yacc, 277 in y.output, 223, 228 lookahead and, 237 non-terminals in, 224 with overlapping alternatives, 238-240 reductions, 53, 219, 336 redundant grammars, 233 reentrant parsers, 209, 280, 292 regular expressions, 1, 27, 28, 336 all except ranges of characters, 28, 167 any character, 28, 167 beginning of line, 28, 169 C comments, 45-46 C escape sequences in, 28 comments starting with #, 31 decimal numbers, 30 defined (see substitutions) digits, 30 either of two, 29, 169 end of C comments, 47 end of line, 28, 169 groups, 29, 169, 260 integers, 30 literal text, 29, 169 logical or in, 29, 169 maximum number of repetitions, 168 metacharacters in, 28-29, 167-169 minimum number of repetitions, 168 multiple copies, 28 multiple occurrences, 29, 168 named (see substitutions) number of occurrences, 28, 168 numbers, 28, 30 quotation marks in, 29, 169 quoted strings, 31 ranges of characters, 28, 167 real numbers, 30 repetitions, 28, 168 single characters, 28, 167 special characters in, 28-29, 33, 167-169, 260 start states in, 169 syntax, 167 whitespace in, 45, 167 zero or more copies, 28, 168 zero or one occurrence, 29, 168 (see also patterns) REJECT, 160, 170 illegal, 285 relational data bases, 109 renaming, generated lexers, 163 lex functions and variables, 162 yacc generated names, 207 repeat counts, illegal, 284 repetitions, 28, 168 reporting lexer data, 283 reserved symbols in yacc, 275 reserved words, in SQL, 117, 120 in symbol tables, 72 resolving conflicts, 233-240 restarting lexers, 171 resynchronizing, 248 return statement, 7, 171 returning values from yylex(), 171 reused names, 246 -r flag, in AT&T lex, 255 in Berkeley yacc, 273 RHS, 52, 335, 337 (see also right-hand side) right associative operators, 195 right associativity, 62 right contexts, in lex, 149, 152 too many, 260 right recursion, in yacc, 197 right-hand side, 52, 198, 337 empty, 88 referring to, 58, 183 right-recursive grammars, 88 root rule, 201 rows, in SQL, 110, 130 rules, 337 | in lex, 5 <> in lex, 172 ; in yacc, 198 assignments in yacc, 56, 200 disambiguating lex, 6 ending yacc, 56, 198, 200 <<EOF>> in flex, 285 error in first in AT&T yacc, 265 left-hand side in yacc, 52, 57, 198, 335 lex, 5 logical or in yacc, 52, 199-200 missing return value in AT&T yacc, 268 never reduced in AT&T yacc, 264, 269 never reduced in Berkeley yacc, 277 recursive yacc, 53, 197 reducing yacc, 53, 219 requiring backtracking in flex, 282 right-hand side in yacc, 52, 198, 337 section in yacc, 182 start (see start states) start symbol missing in Berkeley yacc, 276 suppressing default in flex, 283 tokens on left-hand side in AT&T yacc, 270 tokens on left-hand side in Berkeley yacc, 275 too many in AT&T yacc, 268 unused in Berkeley yacc, 277 using same lex action, 5 with lex start states, 42 without actions in AT&T yacc, 266 without explicit lex start states, 44 yacc, 18, 52, 198 rules section, bugs in lex, 150 empty in Berlekey yacc, 275 lex, 5, 33, 148 yacc, 56, 182 rules, | in yacc, 52, 199-200 running, lex, 21 lexers, 27 parsers, 59 yacc, 21 runtime debugging code, 263 S scalar expressions in SQL, 132 scanners, (see lexers) schema sublanguage in SQL, 120 scientific notation, 30 screens, in MGL multiple, 89 names, 90, 97 rules, 89, 97 terminating, 100 search conditions in SQL, 136-137 section delimiters, lex, 5, 33 yacc, 18, 181, 199 sections, of lex specifications, 32, 147 of yacc grammars, 56, 181 sed, 163, 207 SELECT statement in SQL, 111, 133-134 selection preferences, 292 semantic, meaning, 339 parsers, 280 values, 338 semicolon (;), in yacc rules, 56, 198, 200 sentences, 51 separate files for code and tables, 273 -S flag, in flex, 283, 286 -s flag, in flex, 283 sharp sign (#), delimited comments, 31 shifting, 337 shift/reduce conflicts, 60, 63, 185, 220, 337 avoiding, 196 embedded actions and, 183 identifying, 225 in Berkeley yacc, 277 in expression grammars, 229, 236 in IF-THEN-ELSE grammars, 231, 233 in nested list grammars, 232 in y.output, 225, 228 lookahead and, 237 shift/reduce parsing, 53 shifts, 53 single characters, as tokens, 192 matching, 28, 167 single quotes (`'), in yacc, 192, 200 single-step debugging, 292 size of lex internal tables, 159 skeleton files, 102 slash (/), in regular expressions, 29, 149, 153, 169, 260 Smalltalk, 294 sort orders, 170 special characters, in regular expressions, 167 in yacc, 199 special purpose languages, 81 specifications, 1, 27, 337 porting, 166 structure of, 147 yacc (see grammars) SQL, 109, 112 AMMSC token, 132 ANSI standards, 109 ANY and ALL predicates, 139 arithmetic operations, 132 base tables, 122-123 BETWEEN predicate, 137 columns, 110, 123 comments in, 114 COMPARISON predicate, 137 cursor definitions, 126-127 data bases, 110 data types, 123 DELETE statement, 131 embedded, 113, 139, 141 embedded preprocessor (see embedded SQL preprocessor) error checking in lexer, 118 EXEC SQL, 113, 143 FETCH statement, 129 grammar, 118 GRANT option, 126 IN predicate, 139 INSERT statement, 130 lexer, 114 lexer for embedded, 141 lexer source code, 328-331 LIKE predicate, 137 main() in lexer, 118 Makefile for syntax checker, 140 manipulation sublanguage, 128-129 MKS parser for, 292 module language, 112, 126 multiple input tokens, 119 names in, 118 NULL reserved word, 124, 138 numbers in, 118-119 operators in, 119 parser, 118 parser cross-reference, 322-327 parser source code, 311-321 pcyacc scanner and parser, 294 preprocessor, 113, 141 primary key, 110 privilege definitions, 125-126 punctuation in, 118 queries, 111 recursive scalar function grammar, 133 reserved words, 117, 120 rows, 110, 130 rules, 120 rules for grammar, 322-327 scalar expressions in, 132 schema sublanguage, 120 schema view definitions, 124 search conditions, 136-137 SELECT statement, 111, 133-134 start states, 142 strings in, 118-119 subqueries, 137 sub-token codes, 119 supporting C source code, 331-333 symbols, 322-327 syntax, 110 syntax checker, 114, 140 table expressions, 134-135 table manipulation, 111 tables, 110 tokens, 119, 322-327 UPDATE statement, 131-132 validating, 114 view definitions, 124-125 views, 124 virtual tables, 124 whitespace in, 114 yyerror() for, 118 square brackets ([]), in POSIX, 170 in regular expressions, 28, 167 stack, AT&T lex internal, 260 overflow in yacc, 261 yacc internal, 53 standard, input, 35 I/O, 95 lex and yacc, 295 output for source code, 295 output from AT&T lex, 255 SQL, 109 start conditions, illegal, 259, 261, 284 redeclared, 285 (see start states) start rules, 337 for multiple grammars, 206 in MGL grammar, 89 (see start states) start states, 42, 152, 171-172, 337 changing, 149 creating, 43, 172 default, 149 exclusive, 45, 172 explicit, 42 for embedded SQL preprocessor, 142 for multiple lexers, 161 in regular expressions, 169 rules with explicit, 44 undeclared, 261, 285 when matching, 169 wild card, 45 start symbols, 53, 337 declaring, 57 default, 57 illegal, 264, 275 redeclaring, 276 rule missing, 276 state zero, 43, 172 statements, lex return, 7 yacc, 52 states, bad, 256 changing, 43 default, 43 INITIAL, 172 lex start, 42 numbers, 222 overly complex, 260 parser, 221 start (see start states) summary from AT&T lex, 255 too many, 261 yacc, 53 zero, 43, 172 static tables for keywords, 93 statistics, AT&T lex, 255 from POSIX lex, 295 lex, 159 stdin, 35 stdio, 159, 295 strings, empty, 334 in SQL, 118-119 input to lex, 156 too long, 259 unterminated in yacc, 266, 274 wrong type, 244 structure, of grammars, 56, 181 of lex specifications, 147 structured input, 1 structured query language, (see SQL) substitutions, 33, 153 illegal, 258, 283-284 in patterns, 153 matching, 28, 168 named with digits, 259 not found, 257 undefined, 284 sub-token codes, 119 success value, 212 summaries, suppressing lines, 255 suppressing statistics, 295 support routines, lex, 34, 148 yacc, 182 suppressing, default rules, 283 summary lines, 255 summary statistics, 295 symbol tables, 9-13, 9, 67, 338 adding entries, 13, 68 adding reserved words, 72 declarations, 9, 11 lookups, 13, 68 maintenance routines, 10 pointers, 67 reserved words in, 72 searching, 68 space allocation for, 71 symbol types, 201, 204 explicit, 202 for embedded actions, 184 for inherited attributes, 190 symbol values, 57 declaring types, 205 symbolic tokens, 203 maximum number of, 193 symbols, 14, 181, 338 . in, 200 multiple value types, 65 non-terminal, 52, 182, 335 redeclaring types, 276 reserved in yacc, 275 setting type for non-terminals, 66 start, 53, 57, 337 terminal, 52, 182 types, 201, 204 values, 87, 201 yacc, 181 (see also non-terminal symbols and tokens) synchronization point, 248 synchronizing parsers, 214 syntactic validation, 51 syntactic values, 338 syntax, of lex regular expressions, 167 of SQL, 110 syntax checker for SQL, 114, 140 syntax errors, 188 recovering from, 214, 216 reporting, 215, 243 user-detected, 215 synthesized attributes, 189 System V, 338 T table expressions in SQL, 134-135 table of precedences, 62 tables, action in yacc, 264 base, 122 error in lex, 257 fast in flex, 283 for lex parse trees, 259 in SQL, 110-111 output in lex, 259 states in yacc, 270 temporary files in yacc, 265, 269 terminal symbols, (see tokens) terminals, (see tokens) terminating MGL screens, 100 -T flag, in flex, 283 -t flag, in AT&T lex, 255 in AT&T yacc, 263 in POSIX lex, 295 in POSIX yacc, 296 in yacc, 214 TITLE in MGL, 82, 88, 98 token buffer, enlarging, 178 lex, 177 token definition file, 15 token numbers, 66, 203 listing of, 203 redeclaring, 276 token values, 203 declaring types, 204 tokenizing, 27, 338 tokens, 52, 148, 182, 202, 338 . in names, 200 appending, 177 case of names, 182 codes, 15 copying, 87 current in lex, 246 defining, 56, 203 discarding lookahead, 213 end of input, 59 error, 188, 243, 247-249, 251 illegal start, 275 in SQL grammar, 119 length of, 174 literal, 192 lowercase names, 182 naming, 18 numbers, 203 on left-hand side, 270, 275 overlapping, 170 redeclaring numbers, 276 redeclaring precedence, 269 redeclaring types, 271 single character, 192 symbolic, 203 too large, 260 too many in yacc, 270 types, 201 unshifting in yacc, 213 uppercase names, 182 values, 201, 203 zero, 59 trace code in parsers, 214 trace mode, 283 trailing context operator, 149 transitions, bad, 256 too many, 261 translation tables, 167, 257 errors, 257, 284 in flex, 281 in POSIX lex, 296 translations, 151 tree representation of parsing, 52 types, <> missing, 271 clash, 266 declaring, 264, 268 illegal for values, 275 missing, 275-276 multiple, 65 names in yacc, 200 not specified for %token, 268 of symbols, 204 redeclaring, 271, 276 setting for non-terminal symbols, 66 U uncompressed tables, in flex, 283 undefined, non-terminal symbols, 269, 277 start states, 261, 285 substitutions, 284 underscore (_), in yacc, 200 in y.output, 224 unions, 66, 205 unput(), 38, 41, 151, 173 in flex, 282 redefining, 148, 155-156, 173 unshift current token, 213 unterminated, actions in flex, 284 actions in yacc, 264, 275 comments in lex, 257 comments in yacc, 266, 274 patterns in flex, 284 strings in input, 244 strings in lex, 258 strings in yacc, 266, 274 type names, 271 %union, 266, 274 UPDATE statement in SQL, 131-132 user code, in lexers, 176 in yacc definition section, 182, 192 user subroutines section, lex, 7, 34, 148 yacc, 19, 182 user-detected syntax errors, 215 V validating SQL, 114 validation, syntactic, 51 value references, illegal, 275-276 in yacc actions, 199 values, 57, 338 data types of, 57 default type, 57 illegal types, 264, 275 multiple data types, 57 of embedded actions, 184 of inherited attributes, 190 of non-terminal symbols, 57 of symbols, 57 of tokens, 203 pointers, 87 yacc symbols, 201 variables in lex, 33, 148 variant grammars, 205 verbose flag in yacc, 221 vertical bar (|), after lex patterns, 5, 148 in regular expressions, 29, 169 in yacc rules, 52, 199-200 -v flag, in AT&T lex, 255 in AT&T yacc, 263 in flex, 283 in lex, 159, 255 in POSIX lex, 295 in POSIX yacc, 296 in yacc, 221 views in SQL, 124 virtual tables in SQL, 124 VISIBLE in MGL, 91 W warning messages, 244 whitespace, 45 in lex definition section, 147 in lex patterns, 167 in lex rules section, 148 in SQL, 114 wild card start states, 45 words, counting, 32 recognizing, 3 working set, 271 writing files, errors, 256 wrong type of string, 244 Y yacc, 263, 338 $ in, 199 <> in, 66 actions, 19, 58, 182, 199 ambiguity, 184 associativity, 195 bugs in, 186 C code in actions, 200 changing prefix for generated names, 207 character codes, 194 conflicts, 184, 194, 217 creating C header file, 203 -d flag, 203 debugging parsers, 213 default action, 58, 183 definition section, 18, 56, 182, 192 discarding lookahead tokens, 213 embedded actions, 183 ending rules, 200 entry point, 216 error recovery, 188, 213-214, 216, 248-251 error reporting, 60, 215, 243 error rule, 19 error symbol, 181 failure value, 212 feedback of context to lex, 191 generating log files, 210 how it parses, 53 %ident, 189 including library, 211 including trace code, 214 inherited attributes, 189 internal storage, 53, 270-271, 274 left recursion, 197 libraries, 77, 194, 211 limitations, 55 listings, 210 literal block, 182, 192 literal tokens, 192, 200 log files, 210 lookahead, 55 main(), 211 original description of, 341 -p flag, 207 pcyacc scanner and parser, 294 pointers, 217 portability, 193 precedence, 195 programs (see grammars) quirks, 187 quotation marks in, 200 quoted characters in, 192 recursion, 197 right recursion, 197 root rule, 201 rules, 18, 198 rules section, 56, 182 running, 21 special characters, 199 special characters in, 199-200 stack overflow, 261 %start, 201 states, 53 structure of grammars, 56, 181 success value, 212 support routines, 182 symbols, 181 syntax errors, 188 -t flag, 214 temporary files, 265, 269 tracker, 292 type names in, 200 unshift current token, 213 user subroutines section, 19, 182 -v flag, 210, 221 value references in actions, 199 values, 57 verbose flag, 221 YYABORT, 212 YYACCEPT, 212 YYBACKUP, 213 yyclearin, 213, 250, 252 YYDEBUG, 214 yydebug, 214 yyerrok, 214, 249, 252 YYERROR, 215 yyerror(), 215 yyparse(), 216 YYRECOVERING(), 216, 250 (see also AT&T yacc) yacc.acts, 265 yacc.tmp, 265 y.code.c, 273 y.out, 210, 217, 291 y.output, 210-211, 229, 265 . in, 224 conflicts in, 221-227 contents, 217, 223 current location in, 224 generating, 263 generating in POSIX yacc, 296 reduce/reduce conflicts in, 223, 228 rules never reduced, 269 shift/reduce conflicts in, 225, 228 y.tab.c, 22, 59, 265, 273 ytab.c, 291 y.tab.h, 22, 58-59, 66, 203 ytab.h, 203 y.tab.h, 205 error opening, 265 generating, 263, 295 ytab.h, 291 YYABORT, 212 YYACCEPT, 212 YYBACKUP, 213 YY_BUFFER_STATE, 155 YY_BUF_SIZE, 179 yyclearin, 213, 250, 252 YY_CURRENT_BUFFER, 155 yy_current_buffer, 178 YYDEBUG, 214 yydebug, 214 YY_DECL, 282 yyerrok, 214, 249, 252 YYERROR(), 193, 215 yyerror(), 19, 60, 188, 215, 243 for SQL, 118 yacc library, 212 yygetc(), 157, 291 yyin, 19, 35, 38, 95, 154-155 renaming, 162 YY_INIT, 171 YY_INPUT, 155, 157 yyinput(), 174 yyleng, 34, 153, 174 renaming, 162 yyless(), 153, 160, 166, 174 renaming, 162 yylex(), 7, 14, 27, 58, 175, 202 C code copied to, 148 renaming, 162 returning values, 171 user code in , 176 yylineno, 160 in flex, 282 renaming, 162 YYLMAX, 178 yy.lrt, 210, 217, 293 yylval, 59, 66, 203, 207 YY_MAX_LINE, 179 yymore(), 160, 177 renaming, 162 yyout, 154, 165 renaming, 162 yyoutput(), 174 yyparse(), 18, 84, 207, 216 recursive, 209 YYRECOVERING(), 216, 250 yyreject(), 166, 256 yy_reset(), 171 yyrestart(), 171 yyRestoreScan(), 155 YY_SAVED, 155 yySaveScan(), 155 YYSTYPE, 57, 66, 201, 205 yytab.c, 293 yytab.h, 203, 293 yytext, 6, 87, 153, 174, 177 enlarging, 178 for error reporting, 215 in POSIX lex, 296 renaming, 162 size, 166 yyunput(), 174 yywrap(), 35, 38, 155, 160, 179 in flex, 281 in POSIX lex, 296 redefining, 160 renaming, 162 Z zero or one occurrence, matching, 29, 168 END

What Our Readers Are Saying

Add a comment for a chance to win!
Average customer rating based on 3 comments:

patriculus, May 29, 2008 (view all comments by patriculus)
This book is very helpful for a beginner and concepts are well explained too .I would recommend this book for all the students who are working on compilers or in lex and yaac.
Was this comment helpful? | Yes | No
(1 of 3 readers found this comment helpful)
naveenhooda2004, May 21, 2007 (view all comments by naveenhooda2004)
this is very intersting book on lex and yacc specially for who are designing compiler and are beginners.. i found it very interesting and understanding this is easy and examples are also given to understand the concept right...
Was this comment helpful? | Yes | No
(1 of 2 readers found this comment helpful)
sheetalb, August 23, 2006 (view all comments by sheetalb)
i know some what that inside in book according to that
first bird is lex and he complete his work and gives output to second bird i.e parse or yacc.so these two birds perfom front end of compilation process ,that i seen
Was this comment helpful? | Yes | No
(2 of 3 readers found this comment helpful)
View all 3 comments

Product Details

ISBN:
9781565920002
Author:
Levine, John R.
Author:
Brown, Doug
Author:
Levine, John R.
Author:
Levine, John
Author:
Mason, Tony
Publisher:
O'Reilly Media
Location:
Sebastopol, CA :
Subject:
C (computer program language)
Subject:
Technology
Subject:
Data processing
Subject:
Operating Systems - UNIX
Subject:
Computers
Subject:
Programming - Software Development
Subject:
Programming languages (electronic computers)
Subject:
Utilities
Subject:
UNIX (Computer file)
Subject:
Compilers (computer programs)
Subject:
Utilities (Computer programs)
Subject:
Unix (Operating system).
Subject:
Language, literature and biography
Subject:
UNIX
Subject:
Lex
Subject:
Yacc
Subject:
Systems programming (Computer
Subject:
Compilers (Computer Science)
Subject:
Lex (Computer file)
Subject:
Yaac
Subject:
Software Development & Engineering - General
Subject:
Lex/Yacc
Subject:
CourseSmart Subject Description
Copyright:
Edition Number:
2
Edition Description:
Second Edition
Series:
A nutshell handbook
Series Volume:
500-157
Publication Date:
19921011
Binding:
Paperback
Language:
English
Illustrations:
Yes
Pages:
388
Dimensions:
9 x 6 x 0.95 in 1.16 lb

Other books you might like

  1. sendmail Cookbook Used Trade Paper $18.95
  2. Bison Manual: Using the YACC -... Used Trade Paper $5.95
  3. Unix Systems Programming:... Used Hardcover $68.00
  4. The New X Window System: An Internet... New Trade Paper $40.95
  5. Object Oriented Programming C++ &... New Trade Paper $84.95

Related Subjects

Computers and Internet » Operating Systems » General
Computers and Internet » Operating Systems » Unix » Linux
Computers and Internet » Operating Systems » Unix » Unix and Linux Programming
Computers and Internet » Software Engineering » General

Lex & Yacc 2ND Edition Used Trade Paper
0 stars - 0 reviews
$14.50 In Stock
Product details 388 pages O'Reilly & Associates - English 9781565920002 Reviews:
"Synopsis" by ,
Shows programmers how to use two UNIX utilities, lex and yacc, in program development. This second edition contains completely revised tutorial sections for novice users and reference sections for advanced users. Twice the size of the original book, this edition features an expanding index; an explanation of each utility that covers basic usage and simple, stand-alone applications; and more.
spacer
spacer
  • back to top
Follow us on...




Powell's City of Books is an independent bookstore in Portland, Oregon, that fills a whole city block with more than a million new, used, and out of print books. Shop those shelves — plus literally millions more books, DVDs, and gifts — here at Powells.com.