Parser { protected final AstExpr bitOr() { AstExpr expr = bitXor(); return orRest(expr); } Parser(String input);  Parser(ElParseContext context, String input); static AstExpr parse(String text); static AstExpr parse(ElParseContext context, String text); AstExpr parse(); AstExpr parse(boolean allowRest); boolean eof(); String rest(); AstExpr relationalRest(AstExpr expr); AstExpr primary(); AstExpr primaryRest(AstExpr expr);  }
@Test public void testBitOr() throws Exception { String text = "a | b"; Parser parser = new Parser(text); AstExpr expr = parser.expr(); AstBinary binaryExpr = (AstBinary) expr; AstIdentifier left = (AstIdentifier) binaryExpr.getLeft(); AstIdentifier right = (AstIdentifier) binaryExpr.getRight(); assertEquals("a", left.getName()); assertEquals("b", right.getName()); assertEquals(expr.toString(), text); }