ConcreteSynSLang1.init() ConcreteSynSLang1.expressions ConcreteSynSLang1.answer ConcreteSynSLang1.hint4

How many of the following expressions are syntactically correct SLang 1 programs?

expressions

CorrectAnswer
  1. 0
  2. 1
  3. 2
  4. 3
  5. 4

Review the syntax for the five types of expressions in SLang 1.

Pay particular attention to the positions of spaces and commas.

This exercise is about syntax, not semantics. A syntactically correct program only has to have a parse tree according to the grammar for SLang 1; it does not have to make sense!

hint4