[Oberon] Gadgets for SyntaxConstrainedEditor
easlab at absamail.co.za
easlab at absamail.co.za
Sun Mar 6 12:23:14 CET 2005
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.
More information about the Oberon
mailing list