Consider the following Jison grammar:
%lex %% \s+ { /* skip whitespace */ } tokens<<EOF>> { return "EOF"; } . { return "INVALID"; } /lex %start ss %% ss : s "EOF" ; productions
Now consider the following five strings:
How many of these strings are parsed successfully according to the grammar above?
answer
First, make sure to understand the regular expressions that define the tokens in this grammar.
Then, carefully study the phrase-structure component of the grammar, focusing on the recursive pattern of the productions.
hint3
The correct answer is: answer