1 19 20 package org.netbeans.modules.lexer.gen.antlr; 21 22 import java.io.File ; 23 import java.util.HashMap ; 24 import java.util.List ; 25 import org.netbeans.modules.lexer.gen.LanguageData; 26 import org.netbeans.modules.lexer.gen.TokenTypes; 27 import org.netbeans.spi.lexer.util.LexerUtilities; 28 29 44 45 public class AntlrLanguageDescriptionGenerator { 46 47 public String generate(String tokenTypesClassName) throws ClassNotFoundException { 48 LanguageData data = new LanguageData(); 49 50 Class tokenTypesClass = Class.forName(tokenTypesClassName); 52 TokenTypes tokenTypes = new TokenTypes(tokenTypesClass); 53 data.registerTokenTypes(tokenTypes); 54 55 return data.createDescription(); 56 } 57 58 } 59 60 | Popular Tags |