java - JavaCC Lexer Generator Integration the NetBeans Platform -


i new in using javacc. trying integrate editor our company defined language. need change keywords , modify syntax. follow this link procedure. testing change lines below code link. change keyword finally require. change following lines in code.

javaparserconstants.java

    int false = 25;     /** regularexpression id. */     int final = 26;     /** regularexpression id. */     //int = 27;     int require=27;     /** regularexpression id. */     int float = 28;     /** regularexpression id. */           *          *     string[] tokenimage = {          *     "\"false\"",     "\"final\"",     "\"require\"",//fınally     "\"float\"", 

sjlanguagehierarchy.java

 private static void init() {   tokens = arrays.<sjtokenid>aslist(new sjtokenid[]{          *          *    new sjtokenid("false", "keyword", 25),    new sjtokenid("final", "keyword", 26),    new sjtokenid("require"/*"finally"*/, "keyword", 27),     new sjtokenid("float", "keyword", 28) 

java1.5.jj

/* reserved words , literals */ token : { * * | < false: "false" > | < final: "final" > | < require: "require" > | < float: "float" > 

but did not affect still when using new integrated "editor" highlight old syntax including keyword finally.any suggestions or advice highly appreciated.

thanks @theodore norvell find out code not work if change keywords after generating code. java1.5.jj file should first changed , generated keypoint stacked.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -