MCPcopy Create free account
hub / github.com/chibash/stone / parse

Method parse

src/stone/Parser.java:36–44  ·  view source on GitHub ↗
(Lexer lexer, List<ASTree> res)

Source from the content-addressed store, hash-verified

34 protected Parser[] parsers;
35 protected OrTree(Parser[] p) { parsers = p; }
36 protected void parse(Lexer lexer, List<ASTree> res)
37 throws ParseException
38 {
39 Parser p = choose(lexer);
40 if (p == null)
41 throw new ParseException(lexer.peek(0));
42 else
43 res.add(p.parse(lexer));
44 }
45 protected boolean match(Lexer lexer) throws ParseException {
46 return choose(lexer) != null;
47 }

Callers

nothing calls this directly

Calls 4

chooseMethod · 0.95
parseMethod · 0.95
peekMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected