Package com.github.jknack.antlr4ide.lang

Examples of com.github.jknack.antlr4ide.lang.V3Tokens


  @Test
  public void scopeForV3Tokens() {
    EList<V3Token> tokenList = new BasicEList<V3Token>();

    V3Tokens tokens = createMock(V3Tokens.class);
    V3Token token = createMock(V3Token.class);

    expect(tokens.getTokens()).andReturn(tokenList);
    tokenList.add(token);

    Object[] mocks = {tokens, token };

    replay(mocks);
View Full Code Here


    EList<PrequelConstruct> prequels = new BasicEList<PrequelConstruct>();
    EList<V3Token> tokenList = new BasicEList<V3Token>();

    Grammar grammar = createMock(Grammar.class);
    LexerRule rule = createMock(LexerRule.class);
    V3Tokens tokens = createMock(V3Tokens.class);
    V3Token v3Token = createMock(V3Token.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(grammar.getRules()).andReturn(rules);
    expect(grammar.getPrequels()).andReturn(prequels);

    expect(tokens.getTokens()).andReturn(tokenList);

    expect(rule.getName()).andReturn("R");

    expect(v3Token.getId()).andReturn("R");
View Full Code Here

    verify(mocks);
  }

  @Test
  public void v3Tokens() throws Exception {
    V3Tokens tokens = createMock(V3Tokens.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    PowerMock.expectPrivate(validator, "warning",
        "tokens {A; B;}' syntax is now 'tokens {A, B}' in ANTLR 4",
        tokens, 0, "tokens".length());
View Full Code Here

TOP

Related Classes of com.github.jknack.antlr4ide.lang.V3Tokens

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.