Give a regular expression using flex notation that descibes the set of strings that start with a, end with c and have zero or more digits between them.
Write a program using flex that copies the standard input to the standard output, except that it replaces each sequence of consecutive blanks and tabs by a single blank.
Show that the following grammar is ambiguous.
S -> S c S |
S -> d |
Show a parse tree for string cccdd with respect to grammar
S -> c S d |
S -> c |
What are the FIRST and FOLLOW sets for the following grammar? The start nonterminal is E.
E -> A |
E -> L |
A -> n |
A -> i |
L -> ( S ) |
S -> E , S |
S -> E |
Build the finite state machine of LR(0) items for the grammar of the preceding problem, and show the SLR(1) parsing table for that grammar.