Gadgets for SyntaxConstrainedEditor
MODULE NewSource;
END NewSource. where the 'cursor' is by default at 'NewSource title', and it's
Why should we be punished to pick chars off a keyboard, a-la-1965, when we could pick structures which are constrained to be syntactically correct at each stage of the refinement process ? eg. Pick: 'NewSource' and See something like:--- possible editing is auto-duplicated at the matching 'END NewSource'. I.e the text is constrained to be snytactically correct. ------------------------ Pick: 'Refine' and See something like:---
MODULE Sample1;
*CONST *TYPE *VAR *PROCEDURE *BEGIN
END Sample1. where the '*<valid selection>s are conveniently available.
Pick: 'VAR' and See something like:---
MODULE Sample1;
VAR ? : <current TypeList> ;
END Sample1. where "?" and <current TypeList> are hi-lit and the cursor is appropriately located.
.... Pick: 'PROCEDURE' and See something like:---
MODULE Sample1;
VAR i: INTEGER;
PROCEDURE <ProcID>; BEGIN END <ProcID>;
END Sample1. where the non-creative input is automated...
.... Pick: '<Statement>' and See something like:---
... * assignment * ProcedureCall *IfStatement ...
Pick: '* assignment' and See something like:---
*<list of currently valid designators> := <Expression>. ..........
Even IF the concept is only viable for 'toy-sources', evolution/refinement could perhaps bootstrap a useful tool ? Reading through Chapter3.Text , Chapter4.Text again, it seems that I for one made a big mistake in not devoting effort to build fluency to use Gadgets. It seems that Gadgets would be ideal for such a SyntaxEditor ? == Chris Glur.
In the Bluebottle editors as well as in the Oberon Editors you can use a configurable and parametrizable macro system for writing this kind of boring code. try: NewSource:M<ins> resulting in: MODULE NewSource; END NewSource. MyProcedure:P<ins> resulting in: PROCEDURE MyProcedure; BEGIN END MyProcedure; ObjectExtension:ObjectBase:o<ins> resulting in: TYPE ObjectExtension = OBJECT(ObjectBase) END ObjectExtension; where <ins> is the insert key on the keyboard. There are dozens of predefined macros and it is extensible as well. (See Tutorial.Text in Bluebottle) --Thomas easlab@absamail.co.za wrote:
Why should we be punished to pick chars off a keyboard, a-la-1965, when we could pick structures which are constrained to be syntactically correct at each stage of the refinement process ?
eg. Pick: 'NewSource' and See something like:---
MODULE NewSource;
END NewSource.
where the 'cursor' is by default at 'NewSource title', and it's possible editing is auto-duplicated at the matching 'END NewSource'. I.e the text is constrained to be snytactically correct. ------------------------ Pick: 'Refine' and See something like:---
MODULE Sample1;
*CONST *TYPE *VAR *PROCEDURE *BEGIN
END Sample1.
where the '*<valid selection>s are conveniently available. ------------------------ Pick: 'VAR' and See something like:---
MODULE Sample1;
VAR ? : <current TypeList> ;
END Sample1.
where "?" and <current TypeList> are hi-lit and the cursor is appropriately located. ------------------------ .... Pick: 'PROCEDURE' and See something like:---
MODULE Sample1;
VAR i: INTEGER;
PROCEDURE <ProcID>; BEGIN END <ProcID>;
END Sample1.
where the non-creative input is automated... ------------------------ .... Pick: '<Statement>' and See something like:---
... * assignment * ProcedureCall *IfStatement ...
------------------------ Pick: '* assignment' and See something like:---
*<list of currently valid designators> := <Expression>.
..........
Even IF the concept is only viable for 'toy-sources', evolution/refinement could perhaps bootstrap a useful tool ?
Reading through Chapter3.Text , Chapter4.Text again, it seems that I for one made a big mistake in not devoting effort to build fluency to use Gadgets.
It seems that Gadgets would be ideal for such a SyntaxEditor ?
== Chris Glur.
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://www.mail.inf.ethz.ch/lists/listinfo/oberon
Hi easlab, Sunday, March 6, 2005, 11:23:14 AM, you wrote:
Why should we be punished to pick chars off a keyboard, a-la-1965, when we could pick structures which are constrained to be syntactically correct at each stage of the refinement process ?
eg. Pick: 'NewSource' and See something like:---
MODULE NewSource;
END NewSource. [...]
It seems that Gadgets would be ideal for such a SyntaxEditor ?
why not just copy it from a template file? Blackbox has "File | Open Stationery...", which you use to pick an existing file. The system copies into a new, anonymous text which you can edit and have to save with a new name. Simple. -- Regards, Bob
participants (3)
-
Bob Walkden -
easlabīŧ absamail.co.za -
Thomas Frey