ANSWER TO EXERCISE 63 | |
The trick is to convert "fly in amber'' into "fly fly amber'' (a harmless name) before the parser gets under way. [ BeforeParsing i j; for (i=parse->1,j=2:j<i:j++) { wn=j-1; if (NextWord()=='fly' && NextWord()=='in' && NextWord()=='amber') parse-->(j*2-1) = 'fly'; } ]; |