当前位置: 首页>>代码示例>>Java>>正文


Java LexerRestartInfo.input方法代码示例

本文整理汇总了Java中org.netbeans.spi.lexer.LexerRestartInfo.input方法的典型用法代码示例。如果您正苦于以下问题:Java LexerRestartInfo.input方法的具体用法?Java LexerRestartInfo.input怎么用?Java LexerRestartInfo.input使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.netbeans.spi.lexer.LexerRestartInfo的用法示例。


在下文中一共展示了LexerRestartInfo.input方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ProtobufEditorLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
/**
 * @requires info != null
 * @effects Makes this be a new Protobuf editor lexer with 'info'.
 */
ProtobufEditorLexer(LexerRestartInfo<ProtobufTokenId> info) {
    Assert.notNull(info);

    this.info = info;

    this.lexer =
            new ProtobufLexer(
                    new AntlrCharStream(info.input(), SOURCE_NAME));
    this.lexer.setChannel(ProtobufLexer.HIDDEN);

    AntlrLexerState state = (AntlrLexerState) info.state();

    if (state != null) {
        state.apply(lexer);
    }
}
 
开发者ID:mwillema,项目名称:protobuf-netbeans-plugin,代码行数:21,代码来源:ProtobufEditorLexer.java

示例2: FTLLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public FTLLexer(LexerRestartInfo<FTLTokenId> info) {
    this.info = info;
    final LexerInput input = info.input();
    InputStream istream = new InputStream() {

        @Override
        public int read() throws IOException {
            int result = input.read();
            //debug("read " + result);
            //if (result == LexerInput.EOF) {
            //    throw new IOException("LexerInput EOF");
            //}
            return result;
        }
    };
    SimpleCharStream stream = new SimpleCharStream(istream);
    fmParserTokenManager = new FMParserWSTokenManager(stream);
}
 
开发者ID:rostanek,项目名称:freemarker-support-for-netbeans,代码行数:19,代码来源:FTLLexer.java

示例3: JPQLLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
JPQLLexer(LexerRestartInfo<JPQLTokenId> info) {
    this.info = info;
    this.input = info.input();
    this.tokenFactory = info.tokenFactory();
    //JavaCharStream stream = new JavaCharStream(info.input());
    //javaParserTokenManager = new JavaParserTokenManager(stream);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:JPQLLexer.java

示例4: JavaLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public JavaLexer(LexerRestartInfo<JavaTokenId> info) {
    this.input = info.input();
    this.tokenFactory = info.tokenFactory();
    this.state = (Integer) info.state();
    if (state == null) {
        Supplier<String> fileName = (Supplier<String>)info.getAttributeValue("fileName"); //NOI18N
        if (fileName != null && "module-info.java".equals(fileName.get())) { //NOI18N
            state = 1; // parsing module info
        }
    }
    
    Integer ver = (Integer)info.getAttributeValue("version"); //NOI18N
    this.version = (ver != null) ? ver.intValue() : 9; // TODO: Java 1.8 used by default        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:JavaLexer.java

示例5: StateLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
StateLexer(LexerRestartInfo<StateTokenId> info) {
    this.input = info.input();
    this.tokenFactory = info.tokenFactory();
    this.state = info.state();
    this.info = info;

    this.useIntStates = Boolean.TRUE.equals(info.getAttributeValue("states"));
    Object expectedRestartState = info.getAttributeValue("restartState");
    if (expectedRestartState != null && !expectedRestartState.equals(state)) {
        throw new IllegalStateException("Expected restart state " + expectedRestartState + ", but real is " + state);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:StateLexer.java

示例6: TestLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TestLexer(LexerRestartInfo<TestTokenId> info) {
    this.input = info.input();
    this.tokenFactory = info.tokenFactory();
    assert (info.state() == null); // never set to non-null value in state()

    Integer ver = (Integer)info.getAttributeValue("version");
    this.version = (ver != null) ? ver.intValue() : 2;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:TestLexer.java

示例7: CfgPropsScanner

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public CfgPropsScanner(LexerRestartInfo info) {
    this.input = info.input();
    if (info.state() != null) {
        //reset state
        setState((LexerState) info.state());
    } else {
        zzState = zzLexicalState = YYINITIAL;
        stack.clear();
    }

}
 
开发者ID:AlexFalappa,项目名称:nb-springboot,代码行数:12,代码来源:CfgPropsScanner.java

示例8: ECLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
private ECLexer(LexerRestartInfo<ECTokenId> info) {
    this.info = info;
    AntlrCharStream charStream = new AntlrCharStream(info.input(), "EditorConfig"); // NOI18N
    lexer = new EditorConfigLexer(charStream);
    lexer.removeErrorListeners();
    // TODO add listener
    LexerState lexerMode = (LexerState) info.state();
    if (lexerMode != null) {
        lexer._mode = lexerMode.Mode;
        lexer._modeStack.addAll(lexerMode.Stack);
    }
}
 
开发者ID:junichi11,项目名称:netbeans-editorconfig-editor,代码行数:13,代码来源:ECLexer.java

示例9: ECLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
private ECLexer(LexerRestartInfo<ECTokenId> info) {
  this.info = info;
  AntlrCharStream charStream = new AntlrCharStream(info.input(), "EditorConfig"); // NOI18N
  lexer = new EditorConfigLexer(charStream);
  lexer.removeErrorListeners();
  // TODO add listener
  LexerState lexerMode = (LexerState) info.state();
  if (lexerMode != null) {
    lexer._mode = lexerMode.Mode;
    lexer._modeStack.addAll(lexerMode.Stack);
  }
}
 
开发者ID:welovecoding,项目名称:editorconfig-netbeans,代码行数:13,代码来源:ECLexer.java

示例10: clsEditorLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public clsEditorLexer(LexerRestartInfo<ANTLRTokenId> info) {
    this.info = info;
    ANTLRCharStream charStream = new ANTLRCharStream(info.input(), "editor");
    lexer = new clsLexer(charStream);
    clsLexer.lexerState state = (clsLexer.lexerState) info.state();

    lexer.setLexerState((clsLexer.lexerState) info.state());
}
 
开发者ID:daimor,项目名称:NBStudio,代码行数:9,代码来源:clsEditorLexer.java

示例11: macEditorLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public macEditorLexer(LexerRestartInfo<ANTLRTokenId> info) {
    this.info = info;
    ANTLRCharStream charStream = new ANTLRCharStream(info.input(), "editor");
    lexer = new macLexer(charStream);
    macLexer.lexerState state = (macLexer.lexerState) info.state();
    
    lexer.setLexerState((macLexer.lexerState) info.state());
}
 
开发者ID:daimor,项目名称:NBStudio,代码行数:9,代码来源:macEditorLexer.java

示例12: xdataEditorLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public xdataEditorLexer(LexerRestartInfo<ANTLRTokenId> info) {
        this.info = info;
        ANTLRCharStream charStream = new ANTLRCharStream(info.input(), "editor");
        lexer = new xdataLexer(charStream);
//        xdataLexer.lexerState state = (xdataLexer.lexerState) info.state();
//        
//        lexer.setLexerState((xdataLexer.lexerState) info.state());
    }
 
开发者ID:daimor,项目名称:NBStudio,代码行数:9,代码来源:xdataEditorLexer.java

示例13: DeclarativeHintLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public DeclarativeHintLexer(LexerRestartInfo<DeclarativeHintTokenId> info) {
    input = info.input();
    fact  = info.tokenFactory();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:DeclarativeHintLexer.java

示例14: TestLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public TestLexer(LexerRestartInfo<TestTokenId> info) {
    this.input = info.input();
    this.factory = info.tokenFactory();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:TestLexer.java

示例15: TestHTMLTagLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public TestHTMLTagLexer(LexerRestartInfo<TestHTMLTagTokenId> info) {
    this.input = info.input();
    this.tokenFactory = info.tokenFactory();
    assert (info.state() == null); // passed argument always null
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:TestHTMLTagLexer.java


注:本文中的org.netbeans.spi.lexer.LexerRestartInfo.input方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。