Question: Suppose that the expression grammar in Example 2.8 were to be used in conjunction with a scanner that did not remove comments from the input,
Suppose that the expression grammar in Example 2.8 were to be used in conjunction with a scanner that did not remove comments from the input, but rather returned them as tokens. How would the grammar need to be modified to allow comments to appear at arbitrary places in the input?
Step by Step Solution
3.38 Rating (164 Votes )
There are 3 Steps involved in it
goal comment opt expression comment opt expression term expr... View full answer
Get step-by-step solutions from verified subject matter experts
