Regular Expressions (RegExes) can be thought of as simple computer programs, but they are just as capable of stumping beginners. Inspired by how block-based languages like Snap! made code more accessible to new programmers, I decided to try doing the same for RegEx patterns. This project provides a (hopefully) easy-to-understand set of blocks that let you build RegExes without worrying about the syntax.
I like this idea!
I think maybe you could improve the clarity of the presentation by reducing the number of blocks. For example:
instead of three separate blocks, to clarify that they're variants of the same idea.
Thank you for taking a look at my project!
I did not know that you could do dropdowns in custom blocks! That is pretty cool.
The original intent of the project was to help teach how to put RegEx blocks together, so I figured that the JS engine would be fine. But you are right, it would be very good for people to be able to see how the actual engine works, even if it would take a bit of time to implement.
I can't work out how to run the fsm program to play game
Oh. GAME calls FSM. You say, e.g., GAME 3 to play the third (of ten) games. FSM takes an arbitrary finite state machine and simulates it.
I mean more fundamental than that
What do I physically run it in?
Oh! Berkeley Logo.
... and when you start Logo you can just say
to load that program.
Getting there - managed to run game 1
But how do I quit game 1 without closing Logo environment (running on windows if that make any diff)
It does make a difference, because on my Mac you type option-C to stop the running program. But if you look on the menu bar there should be a menu named Logo and it'll have options "stop" and "pause" and you can look at the keyboard shortcut shown next to the "stop" one.
edit: Thank you for finding a Logo bug... those lines with the all-caps ACCEPT and REJECT should also be showing what you typed to get to those states.
That's my problem - when I click on stop - the whole Logo window closes
But I just want to quit the running game 1 program
Is this another bug?
BTW it works fine if I don't have a running program
Oh. Yes it is. I thought that was just on my Mac. I've filed a bug report.
Meanwhile, after loading the program, type
and then paste this in:
to fsm1 :here ifelse memberp :here :accept [accept] [reject] fsm1 (fsmnext :here fsmcheckstop readchar) end to fsmcheckstop :char if :char = "s [throw "toplevel] op :char end
And then you can type "s" (just plain s) to stop the game.