Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is saying that an offset_clause can either be the word OFFSET followed by an a_expr, the rule for a general relational expression in this grammar, or the word OFFSET followed by a c_expr (a restricted form of a_expr) and row_or_rows, a rule that expands to either the word ROW or the word ROWS, a testament to just how flexible SQL's syntax can sometimes be.

Hints:

  • $$ represents the output value of the current rule, $1 the value of the first symbol in the current rule, $2 the value of the second symbol, etc.

  • STEP only needs to be added to SELECT statements, not DELETE or UPDATE.
  • Remember to add the STEP keyword to one of the keyword category lists at the end of the grammar (this has to be done whenever a new keyword is added).

Type-Checking: Ensuring STEP's arguments are typed as integers

...