Define Syntax and Semantics Which of the following are tokens in Java? A. while B. mult_op C. } D. identifier Which of the following are lexemes in Java? A. for B. int_literal C. ++ D. semicolon Which of the following are nonterminal symbols in the grammar rule: * – > (++| –) ident |(+|-) (ident | int_literal) ( ) A. factor B. ident C. + D. Which of the following are terminal symbols in the grammar rule: * – > (++|–) ident |(+|-) (ident | int_literal) | ( ) A. ident B. C. int_literal D. ++ Given grammar: rightarrow rightarrow | : rightarrow = rightarrow a | b | c | d rightarrow + | – rightarrow | const Write down derivation of: b = a – c What is ambiguous in a grammer?
Expert Answer