コード例 #1
0
ファイル: TokenUtils.java プロジェクト: timeraider4u/kefax
 protected static String print(final String start, final List<Token> tokens) {
   final StringBuffer buffer = TokenUtils.getStringBufferFor(tokens, true);
   buffer.insert(0, start);
   buffer.append("'");
   MyLog.trace(TokenUtils.class, buffer.toString());
   return buffer.toString();
 }
コード例 #2
0
 @Before
 public void setUp() throws Exception {
   MyLog.setLog_level(MyLog.LOG_NONE);
   final LexerUtils lexerUtils = new LexerUtils(this.lexer, this.tokenDefProvider);
   this.definitionTable = new DefinitionTable(lexerUtils);
   this.definitionTable.reset();
   Assert.assertEquals(0, this.definitionTable.size());
   this.factory = PreprocessFactory.eINSTANCE;
   final PreprocessInjectorProvider provider = new PreprocessInjectorProvider();
   final Injector injector = provider.getInjector();
   final IExpressionVisitor<Long> visitor =
       new ExpressionLongVisitor(injector, this.definitionTable);
   this.evaluater = new ExpressionEvaluation<Long>(visitor);
 }