Discussion:
Mickey-Mouse coding.
(too old to reply)
n***@gmail.com
2015-09-24 13:28:08 UTC
Permalink
I created an <automatic menu syntax-directed multi-language> writer,
[the next stage after syntax coloring] ....
-- snip ---- snip ---- see OP: comp.lang.oberon
So, essentially kliking any <hot Tokens> replaces it
with it's expansion.

It's a type of syntax directed menu.

Let me get back to wily, and you write an ETHO prototype.

Oh, for ETHO you'd use eg:
x.START , x.ConstDecls , x.Statements ,x.Expression
===================== Stage 2:-
OK, ETHO seems not to have a:
FindReplaceTextFrame(FindStr, ReplaceStr,TextFrame)
so by doing it manually, each <expansion cycle> costs 4
mouse-klux instead of 1.

Using: START ==
MODULE Mid;
DecLst
BEGIN StmLst
END Mid.
& Substitution sequence : DecLst StmLst IfThenElse
Creates:----
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ ProcDcl }

BEGIN StmLst
END Mid.
------
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ ProcDcl }

BEGIN
Asgn V:=X;
WHILE Bool DO;
IfThenElse

END Mid.
------
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ ProcDcl }

BEGIN
Asgn V:=X;
WHILE Bool DO;
IF Xpn
THEN StmLstS
ELSE StmLstS EndIF


END Mid.
------------- OK, ETHO gives it to me in 4 colors
[which you can't see] and helps to simplify.
Let's see if we can/should remove the 2-line gap before " END Mid."
Remove the trailing line terminating the IfThenElse File,
and run the whole thing from the beginning.
==> gives me:--
MODULE Mid;
CONST <CLst>;
VAR <VLst>;
{ ProcDcl }

BEGIN
Asgn V:=X;
WHILE Bool DO;
IF Xpn
THEN StmLstS
ELSE StmLstS EndIF

END Mid.
----------
This is so simple, it ought to be illegal.

Doing it manually: each cycle of expanding a <HoToken> consists of:
1=mouseMark HoToken
2=klux [Search]
3=mouseWipe TextFrame which has the nameOfThe:HoToken
4=klux [RepAll]

So if you want to experiment with new languages, without the
waste of learning ANOTHER syntax: just build the
(keyWord/HoToken -> ExpansionFile) list.
y***@z505.com
2015-09-27 19:25:10 UTC
Permalink
On Thursday, September 24, 2015 at 7:30:06 AM UTC-6, ***@gmail.com wrote:
....
Post by n***@gmail.com
BEGIN
Asgn V:=X;
What is Asgn?

Does that stand for "assign"... and is this part of oberon or is it some thing you have added? It looks like a C macro that gets expanded and does nothing, just adds syntax to the language to make it clearer you are assigning something. But how are people supposed to read your code when you've changed the language and no one knows what asgn means... it's not documented much anywhere that I could find on google. And if it is meaning "assign" why not shorten PROCEDURE to PROC or PRC or PRO... Why not shorten POINTER TO SOMETHING into a symbol like ^something.
Unknown
2015-10-03 00:03:30 UTC
Permalink
wrote: ....
Post by n***@gmail.com
BEGIN
Asgn V:=X;
What is Asgn?
Does that stand for "assign"... and is this part of oberon or is it some
thing you have added? It looks like a C macro that gets expanded and
does nothing, just adds syntax to the language to make it clearer you
are assigning something. But how are people supposed to read your code
when you've changed the language and no one knows what asgn means...
it's not documented much anywhere that I could find on google. And if
it is meaning "assign" why not shorten PROCEDURE to PROC or PRC or
PRO... Why not shorten POINTER TO SOMETHING into a symbol like
^something.
You've BADLY extracted 2 lines of a dozen chars, as the context of
your question. So I'll just guess what the OP was about.
Yes there's a <common element> to macros.
Macros, subroutines, libraries are for when you KNOW what you need and
want to save <keystrokes>.
ETHO's menu-system does much more.
When you're walking on a mountain-path: your eye-brain-feet-loop is
continually recognising-evaluating-deciding.

I just decided to call it "Asgn"; which you correctly understood.
Personally I prefer pop11 notation:
"price + tax => TotalPayment"

You don't want to "shorten PROCEDURE to PROC".
You want to show the ESSENTIAL choices [eg. eliminating the user's
need to know about semi-colon-statement-terminators] and need the minimum
effort by the user.

When you get into an elevator/lift to go to the 7th floor, you dont
type a 'syntax correct dialog' to the controller.
You look at the selection, and push your chosen button.

linux's mc: the clone of the decades old nc/Norton-Commander is a
prime example of <seeing & deciding how/where you're going>
vs <playing the notes blindly, because you know them by reflex>.

Loading...