Fundamentals of Computer Science

SMU CSE 5311/7311

Fall 1997


Chapter 11: Grammars


Recursive Description of Patterns (11)

Context-Free Grammars

Terminology


Languages from Grammars (11.3)

Languages

Parse Trees (11.4)


Ambiguity (11.5)

Ambiguous Grammars


Constructing Parse Trees (11.6)

Recursive Descent

Table-Driven Parsing (11.7)


Grammars vs. Regular Expressions (10.8)

Regular Expressions to Grammars

Grammars to Regular Expressions


Review: Chapter 10

  1. What does a node in a state machine represent?
  2. What is an arc labeled with?
  3. T or F: There can be only one accepting state.
  4. What is the main distinction between determinism and nondeterminism?
  5. How is ``acceptance'' handled in a nondeterministic automaton?
  6. T or F: Every deterministic automaton is nondeterministic.
  7. What is subset construction used for?
  8. What does one state in the DFSA represent in the NFSA when using subset construction?
  9. What is simulation using a FSA entail?
  10. What are the basic operators for regular expressions?
  11. What the the operands?
  12. T or F: If R = (ab | ba)^* then the string ``abababa'' is in L(R).
  13. What does the regular expression ``[a-m]+[0-9]*'' match?
  14. What does the regular expression ``a..b'' match?
  15. T or F: A DFSA can have epsilon transitions.

Note: These notes are based on the text
Foundations of Computer Science, C Edition
A. Aho and J. Ullman
W.H. Freeman and Company, 1995
ISBN 1-7167-8284-7
and are copyright © 1998 Matthew Diaz, Southern Methodist University. These notes may be freely copied and distributed so long as this notice is included.