- case 0:
- return yy::parser::make_TEXT ("I have three numbers for you.", loc);
- case 1:
- case 2:
- case 3:
- return yy::parser::make_NUMBER (stage, loc);
- case 4:
- return yy::parser::make_TEXT ("And that's all!", loc);
- default:
- return yy::parser::make_END_OF_FILE (loc);
+ static int stage = -1;
+ ++stage;
+ parser::location_type loc(0, stage + 1, stage + 1);
+ switch (stage)
+ {
+ case 0:
+ return parser::make_TEXT ("I have three numbers for you.", loc);
+ case 1:
+ case 2:
+ case 3:
+ return parser::make_NUMBER (stage, loc);
+ case 4:
+ return parser::make_TEXT ("And that's all!", loc);
+ default:
+ return parser::make_END_OF_FILE (loc);
+ }