Skip to Content
flex & bison
book

flex & bison

by John Levine
August 2009
Intermediate to advanced
292 pages
7h 31m
English
O'Reilly Media, Inc.
Content preview from flex & bison

Glossary

action

The C or C++ code associated with a flex pattern or a bison rule. When the pattern or rule matches an input sequence, the action code is executed.

alphabet

A set of distinct symbols. For example, the ASCII character set is a collection of 128 different symbols. In a flex specification, the alphabet is the native character set of the computer. In a bison grammar, the alphabet is the set of tokens and nonterminals used in the grammar.

ambiguity

An ambiguous grammar is one with more than one rule or set of rules that match the same input. In a bison grammar, ambiguous rules cause shift/reduce or reduce/reduce conflicts. The parsing mechanism that bison normally uses cannot handle ambiguous grammars. The programmer can use %prec declarations and bison’s own internal rules to resolve conflicts when creating a parser, or the programmer can use a GLR parser, which can handle ambiguous grammars directly.

ASCII

American Standard Code for Information Interchange; a collection of 128 symbols representing the common symbols found in the American alphabet: lowercase and uppercase letters, digits, and punctuation, plus additional characters for formatting and control of data communication links. Most systems that run flex and bison use ASCII or extended 8-bit codes in the ISO-8859 series that include ASCII as a subset.

bison

A program that translates a dialect of BNF into LALR(1) or GLR parsers.

BNF

Backus-Naur Form; a method of representing context-free grammars. It is commonly used to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Rust in Action

Rust in Action

Tim McNamara
Learning React, 2nd Edition

Learning React, 2nd Edition

Alex Banks, Eve Porcello
Generative AI Design Patterns

Generative AI Design Patterns

Valliappa Lakshmanan, Hannes Hapke

Publisher Resources

ISBN: 9780596805418Errata Page