use of org.eclipse.xtext.parser.impl.PartialParsingPointers in project xtext-core by eclipse.
the class PartialParsingPointerExpressionTest method testExpression_3_1.
@Test
public void testExpression_3_1() throws Exception {
String model = "(a+b+c)*(c/d)";
PartialParsingPointers parsingPointers = calculatePartialParsingPointers(model, 3, 1);
checkParseRegionPointers(parsingPointers, "(a+b+c)", "RuleCall", "Parens");
}
use of org.eclipse.xtext.parser.impl.PartialParsingPointers in project xtext-core by eclipse.
the class PartialParsingPointerExpressionTest method testExpression_8_2.
@Test
public void testExpression_8_2() throws Exception {
String model = "(a+b+c)*(c/d)";
PartialParsingPointers parsingPointers = calculatePartialParsingPointers(model, 8, 2);
checkParseRegionPointers(parsingPointers, "(a+b+c)*(c/d)", "ParserRule", "Sequence");
}
use of org.eclipse.xtext.parser.impl.PartialParsingPointers in project xtext-core by eclipse.
the class PartialParsingPointerExpressionTest method testExpression_a_b.
@Test
public void testExpression_a_b() throws Exception {
String model = "a b";
PartialParsingPointers parsingPointers = calculatePartialParsingPointers(model, 1, 1);
checkParseRegionPointers(parsingPointers, "a b", "Action", "Sequence");
}
use of org.eclipse.xtext.parser.impl.PartialParsingPointers in project xtext-core by eclipse.
the class PartialParsingPointerExpressionTest method testExpression_9_2.
@Test
public void testExpression_9_2() throws Exception {
String model = "(a+b+c)*(c/d)";
PartialParsingPointers parsingPointers = calculatePartialParsingPointers(model, 9, 2);
// actual minimal replace region is c/d but this would lead to accidental complexity
// in the partial parser implementation
// checkParseRegionPointers(parsingPointers, "c/d", "RuleCall", "Addition");
checkParseRegionPointers(parsingPointers, "(c/d)", "RuleCall", "Parens");
}
use of org.eclipse.xtext.parser.impl.PartialParsingPointers in project xtext-core by eclipse.
the class PartialParsingPointerLookaheadTest method testLookahead_29.
@Test
public void testLookahead_29() throws Exception {
String model = "bar a foo bar c b d foo bar b c";
for (int i = 29; i < model.length(); ++i) {
PartialParsingPointers parsingPointers = calculatePartialParsingPointers(model, i, 1);
checkParseRegionPointers(parsingPointers, " c", "RuleCall", "LookAhead4");
}
}
Aggregations