2 which one of the following identities on res is

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: typed. 2. Which one of the following identities on REs is correct? (mark one) (4 points) (a) a(a|b|￿) = (aa|ab) (b) ((a|￿)b)∗ = (a|b)∗ (c) (a∗ b∗ )∗ = (a|b)∗ (d) ab∗ = abb∗ 3. Convert the following infix expression to postfix. You may assume the standard precedence and associativity of the operators is used. (4 points) (a+b)*c-d/e 1 4. There is a serious problem with the following Lex specification: digit integer %% {integer} %% [0-9] {digit}{integer}|{digit} { /* do something ... */ } Rewrite the specification to fix this problem. (8 points) 5. Draw and label the runtime data areas of the JVM. (10 points) 2 6. Consider the following grammar G = ({a, b, c, d}, {S , X }, P, S ), with P : S→ | X→ | Xa Xb Xc d Apply left factoring of the productions for S followed by left-...
View Full Document

Ask a homework question - tutors are online