Search in sources :

Example 21 with PartialParsingPointers

use of org.eclipse.xtext.parser.impl.PartialParsingPointers in project xtext-core by eclipse.

the class PartialParsingPointerLookaheadTest method testLookahead_3_4.

@Test
public void testLookahead_3_4() throws Exception {
    String model = "bar a foo bar c b d foo bar b c";
    for (int i = 3; i < 5; ++i) {
        PartialParsingPointers parsingPointers = calculatePartialParsingPointers(model, i, 1);
        checkParseRegionPointers(parsingPointers, "bar a", "RuleCall", "LookAhead0");
    }
}
Also used : PartialParsingPointers(org.eclipse.xtext.parser.impl.PartialParsingPointers) Test(org.junit.Test)

Example 22 with PartialParsingPointers

use of org.eclipse.xtext.parser.impl.PartialParsingPointers in project xtext-core by eclipse.

the class PartialParsingPointerLookaheadTest method testLookahead_6_8.

@Test
public void testLookahead_6_8() throws Exception {
    String model = "bar a foo bar c b d foo bar b c";
    for (int i = 6; i < 9; ++i) {
        PartialParsingPointers parsingPointers = calculatePartialParsingPointers(model, i, 1);
        checkParseRegionPointers(parsingPointers, model, "ParserRule", "Entry");
    }
}
Also used : PartialParsingPointers(org.eclipse.xtext.parser.impl.PartialParsingPointers) Test(org.junit.Test)

Aggregations

PartialParsingPointers (org.eclipse.xtext.parser.impl.PartialParsingPointers)22 Test (org.junit.Test)17 EObject (org.eclipse.emf.ecore.EObject)3 ReplaceRegion (org.eclipse.xtext.util.ReplaceRegion)3 ICompositeNode (org.eclipse.xtext.nodemodel.ICompositeNode)2 IParseResult (org.eclipse.xtext.parser.IParseResult)2 IReferableElementsUnloader (org.eclipse.xtext.parser.antlr.IReferableElementsUnloader)2 StringReader (java.io.StringReader)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 EStructuralFeature (org.eclipse.emf.ecore.EStructuralFeature)1 ParserRule (org.eclipse.xtext.ParserRule)1 RuleCall (org.eclipse.xtext.RuleCall)1 SyntheticCompositeNode (org.eclipse.xtext.nodemodel.impl.SyntheticCompositeNode)1 ParseException (org.eclipse.xtext.parser.ParseException)1 ParseResult (org.eclipse.xtext.parser.ParseResult)1 Range (org.eclipse.xtext.parser.impl.Range)1