Hi,
I would like to create a new add-on tool. It would act exactly like the JAVA compiler mentioned in the help file Textpad
help file 'How to Customize Tool Properties'.
Features would include:
1, Check syntax
2, Give line number of error, (possibly an error description also)
3, Automatically jump to line when you double click on error
My problem is I do not know how to approach creating this program. I do not know what is the best way of achieving
my aims. I noticed that other programmers had created new Add-ons, and I would like there wisdom and advise and
possibly code examples.
I am a industrial computing graduate if your wondering.
Thanks
Cathal
Creating a New Tool
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
RE: Creating a New Tool
All you need to do is set up the tool as described in the Help menu, and place the following in the Regular Expression box:
^\(\(\(\[^\]+\[^\]+\)\|\([A-Za-z]:\)\)[^:]+\):\([0-9]+\):
The compiler automatically checks the syntax when you compile, and any errors will appear on the Command Results tab, automatically hyperlinked to the file and line number. I believe that you can also acheive the same result by installing the Java Developers Kit (JDK) from Sun, then re-install TextPad... TextPad will detect the JDK during installation and place the tool there automatically.
Alan Bellows
JSP/Servlet/CGI Programmer, Ovid
^\(\(\(\[^\]+\[^\]+\)\|\([A-Za-z]:\)\)[^:]+\):\([0-9]+\):
The compiler automatically checks the syntax when you compile, and any errors will appear on the Command Results tab, automatically hyperlinked to the file and line number. I believe that you can also acheive the same result by installing the Java Developers Kit (JDK) from Sun, then re-install TextPad... TextPad will detect the JDK during installation and place the tool there automatically.
Alan Bellows
JSP/Servlet/CGI Programmer, Ovid
RE: Creating a New Tool
Thanks Alan,
Sorry if my posting was misleading, I want to create my own compiler for a language used on databases. The language is SQR. I can't find anywhere a compiler/syntax checker to use as an add -in for free. That is why I what to know how to go about creating my own.
Thanks again
Cathal
Sorry if my posting was misleading, I want to create my own compiler for a language used on databases. The language is SQR. I can't find anywhere a compiler/syntax checker to use as an add -in for free. That is why I what to know how to go about creating my own.
Thanks again
Cathal
RE: Creating a New Tool
Ah, I'm sorry, I did misunderstand. In that case, I would not be the best person to answer your question, as compilers are still well outside of my abilities... they are quite sophisticated and require a thorough knowledge of a low-level programming language.
But, if I can make a recommendation, I'd suggest that purchasing a compiler is almost always wiser than writing your own... it will save you weeks, months, maybe years of programming time, and you'll get a much more stable, efficient compiler, because it has been around the block a few times, and had a lot of kinks worked out.
Alan Bellows
CGI/JSP/Servlet Programmer, Ovid
http://www.enol.com/~bellows
But, if I can make a recommendation, I'd suggest that purchasing a compiler is almost always wiser than writing your own... it will save you weeks, months, maybe years of programming time, and you'll get a much more stable, efficient compiler, because it has been around the block a few times, and had a lot of kinks worked out.
Alan Bellows
CGI/JSP/Servlet Programmer, Ovid
http://www.enol.com/~bellows