Function List for new language...
-
Have a look here.
-
Well thank you but i can use google…The first reference i found for rapid language with a modified function list doesn’t work…I don’t know if it’s a problem of notepad version or is more tricky then it seems that’s why i’m asking help…
-
Could you supply representative example files (or links) for testing?
Furthermore, what and how should it show up in the function list tree. -
Thanks for your reply. The files are simple text files with different extension. I already have syntax highlighting working for those languages in fact the extension are recognized. I wrote the structure of the files in my previous post…For Kuka KRL you have two files “name_of_program.src” for source code and “name_of_program.dat” for variable declaration the content is as follow :
“name_of_program.src”
DEF Newprog ( ) <— this is the definition for the name of the Program that will contain all subs and functions
DEF MainProg() <----- this is the definition for a subroutine called MainProg
…code…
ENDDEF Sub1() <----- this is the definition for a subroutine called Sub1
…code…
ENDDEFFCT func1(num:IN) <----- this is the definition for a function called func1
…code…
ENDFCTGLOBAL DEF Sub2() <----- this is the definition for a subroutine called Sub2
…code…
ENDEND
Instead the declaration is as follow :
“name_of_program.dat”
DEFDAT MAIN_PROGRAM
int num=0
bool true=false
…code…
ENDDATfor ABB Rapid instead there is just one file that contains both source code and variable declaration, it’s content is
as follow :“name_of_the_program.prg” (or .mod or .sys)
MODULE name_of_the_program
var int num=0
var bool true=falsePROC Main
…code…
ENDPROCFUNC num GetInt
num IntAdd)
…code…
ENDFUNCENDMODULE
And that’s it! In abb rapid you can get also some file with just variable declaration but in any case the Module-ENDMODULE statements are mandatory, the compiler itselfs write these files with those statements. Hope to be clear, thanks for your help.
PS.: If you want to test, just copy and past and save the content as “.src” and “.dat” for kuka krl and “.prg” for abb rapid, that’s it.
-
OK, will give it a try.
-
KUKA Robot Language:
<association id="krl_syntax" userDefinedLangName="KRL" /> <association id="krl_syntax" ext=".src" /> <association id="krl_syntax" ext=".dat" /> <parser displayName="KRL" id="krl_syntax" commentExpr="?'SLC'(?m-s);.*$)"> <function mainExpr="(?-i:(GLOBAL[\t ]+)?DEF(DAT|FCT)?)[\t ]+\K([A-Za-z_$][A-Za-z0-9_$]{0,23})[\t ]*\([^)]*\)" > <!-- comment out the following node to display the method with its parameters --> <functionName> <nameExpr expr="[A-Za-z_$][A-Za-z0-9_$]{0,23}" /> </functionName> </function> </parser>
-
Thank you very much pal, i don’t know why but it doesn’t work, you expression is very similar to other i try to write by myself that didn’t work. I’m really upset about that and i really don’t understand…Why is so difficult to recognize a so simple language that is derived from fortran and C? Thanks again i’ll keep trying but i think that if it’s not done till now is because it never worked…
-
Make sure all three associations are added and the value of the
userDefinedLangName
attribute exactly matches the name in the Language menu to get this … -
PAL YOU’RE GREAT!!! I solved! the problem was the “UserLang name=” value, they must be the same you were right…Now i’m thinking that maybe i spent one month playing with that regex and the problem was the reference name—GOSH! Anyway now i’ll make the same thing for Rapid, thank you very much you solved a big problem for me…In this way i’ll spent less time searching for subs in my programs that often are plenty. THANKS!!!
-
You’re welcome!