(Lexer lexer, List<ASTree> res)
| 65 | protected boolean onlyOnce; |
| 66 | protected Repeat(Parser p, boolean once) { parser = p; onlyOnce = once; } |
| 67 | protected void parse(Lexer lexer, List<ASTree> res) |
| 68 | throws ParseException |
| 69 | { |
| 70 | while (parser.match(lexer)) { |
| 71 | ASTree t = parser.parse(lexer); |
| 72 | if (t.getClass() != ASTList.class || t.numChildren() > 0) |
| 73 | res.add(t); |
| 74 | if (onlyOnce) |
| 75 | break; |
| 76 | } |
| 77 | } |
| 78 | protected boolean match(Lexer lexer) throws ParseException { |
| 79 | return parser.match(lexer); |
| 80 | } |
nothing calls this directly
no test coverage detected