Day15 - Day 15, March 18, 2008, Version 2.0 Item #20. Brief...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Day 15, March 18, 2008, Version 2.0 Item #20. Brief comments on §5.1,2. These sections are really too easy for you to need my lecturing on them, but I’ll provide a few background comments. In §5.1 we see that a regular grammar is a special case of a context free grammar (cfg), since in a cfg, the right hand side of production rules can be any concatenation of terminals and non-terminals —that’s what (V c T)* means in the definition. Analogously we saw that a dfa can be regarded as a special case of an ndfa in which no 8 transitions are used, and where we identify the state q i of the dfa with the state {q i } of a ndfa. In §5.2 we see what it means for a grammar to be ambiguous. (This will overlap your Programming Languages course; little harm in that.) Some students on our midterm exam defined “non-determinism” as if it meant “ambiguous” so it’s a good idea to meet the concept of ambiguity just by way of contrast. A grammar is ambiguous if it has at least one ambiguous sentence. A sentence is ambiguous if it has two
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online