Feature Request
GameBoy
13 Oct 2006, 03:48Ok Alex, it's a biggy, but could be very useful, and not so difficult to program (Atleast I don't think so for your standard).
Right, it's an ASL editor, similar to textpad/notepad or whatever, very simple design layout, open, save, save as... and what not, all the basic do-da's and gizmo's. Syntax highlighting would obviously be the main standard feature, but what would really be helpful, is an auto-correct function that adjusts your ASL code automatically to fix small errors in the syntax.
Basically, how Visual Studio 6.0 works....
If you were to type msgbox"hello world", the program would automatically create a space between msgbox and "hello world, and tidy it up a bit to form MsgBox "hello world".
You could also add a little function that checks if a bracket is missing an end bracket and other things to help fix the code instead of resulting in run-time errors.
And just for fun, you could make a "ScriptTidy" program which adjusts all the ASL code so it's properly indented and spaced
haha
Right, it's an ASL editor, similar to textpad/notepad or whatever, very simple design layout, open, save, save as... and what not, all the basic do-da's and gizmo's. Syntax highlighting would obviously be the main standard feature, but what would really be helpful, is an auto-correct function that adjusts your ASL code automatically to fix small errors in the syntax.
Basically, how Visual Studio 6.0 works....
If you were to type msgbox"hello world", the program would automatically create a space between msgbox and "hello world, and tidy it up a bit to form MsgBox "hello world".
You could also add a little function that checks if a bracket is missing an end bracket and other things to help fix the code instead of resulting in run-time errors.
And just for fun, you could make a "ScriptTidy" program which adjusts all the ASL code so it's properly indented and spaced

I think Im Dead
13 Oct 2006, 04:49Doesn't the textpad syntax highlighting plugin support hitting tab for auto-complete? I'm pretty sure it did, but it's been a while since I bothered.
Freak
13 Oct 2006, 13:37How about changing Quest to use a context-free grammar? Then, among other benefits, it wouldn't be so particular about where spaces were located, and it would be quite easy to make a pretty-printer.
Alex
13 Oct 2006, 13:45Freak wrote:How about changing Quest to use a context-free grammar? Then, among other benefits, it wouldn't be so particular about where spaces were located, and it would be quite easy to make a pretty-printer.
I had a look on Wikipedia for what "context-free grammar" means, but I'm still none the wiser - how would this apply to ASL?
Arbutus
13 Oct 2006, 18:02QDK is heavy on the GUI side and I think intended to be so but I would still like a little ASL button to pop up code relevant to task for manual editing. It would just be more convenient than opening an external text editor every time I needed to tweak a nested if statement. But QDK being a graphical program, an ASL editor is a lower priority.
Freak
13 Oct 2006, 18:38A grammar is a set of rules for defining what is syntactically correct in a language.
For example, IIRC, the following rules describe arithmetic expressions:
EXPRESSION -> EXPRESSION "+" TERM
EXPRESSION -> EXPRESSION "-" TERM
EXPRESSION -> TERM
TERM -> TERM "*" FACTOR
TERM -> TERM "/" FACTOR
TERM -> FACTOR
FACTOR -> UNARY
FACTOR -> "-" UNARAY
UNARY -> number
UNARY -> "(" EXPRESSION ")"
where a word in lowercase or quotes is a terminal, and a word in capitals is a nonterminal.
When you've written a grammar, it's fairly straightforward to create a program that will read that grammar. There are even programs written for that exact purpose (yacc, bison, elkhound).
For example, IIRC, the following rules describe arithmetic expressions:
EXPRESSION -> EXPRESSION "+" TERM
EXPRESSION -> EXPRESSION "-" TERM
EXPRESSION -> TERM
TERM -> TERM "*" FACTOR
TERM -> TERM "/" FACTOR
TERM -> FACTOR
FACTOR -> UNARY
FACTOR -> "-" UNARAY
UNARY -> number
UNARY -> "(" EXPRESSION ")"
where a word in lowercase or quotes is a terminal, and a word in capitals is a nonterminal.
When you've written a grammar, it's fairly straightforward to create a program that will read that grammar. There are even programs written for that exact purpose (yacc, bison, elkhound).