Comments (4)
[ELSE] pushes the current parser hook onto the stack, and replaces it with a parser hook that looks for [THEN] (and similar words). [THEN] pops that hook from the stack.
Since your execute-name? returns true, that true is consumed by [THEN], as parser hook. Of course, calling that hook then will fail.
from gforth.
I see. And is it a bug or not? Either my code or Gforth code does not conform to the standard, or another case also exists. (?)
Obviously, the general solution is to use the separate control flow stack.
[UPD]
By the standard, [IF]
and [ELSE]
shall be the parsing words. It means that when [ELSE]
has executed, the parse area should contain the fragment after the corresponding [THEN]
. In Gforth it is not held.
So, the separate control flow stack will not solve this nonconformance. In the approach when the current parser hook is changed, — the nesting call of the outer interpreter loop is needed.
from gforth.
Yes, that sounds reasonable, so I change Gforth's behavior to scan actively.
from gforth.
Just a reference to the corresponding commit: 5b78724
from gforth.
Related Issues (20)
- LOCATE depends on the current directory HOT 1
- build error: chcon can't apply partial context HOT 1
- Ctrl+D and REFILL HOT 5
- Recognizer for string literals — an odd side effect
- chcon: failed to get security context of 'libgforth-ditc': Operation not supported HOT 2
- Issue with calling C functions: "called function of unfinished named C library" HOT 2
- `make install` fails because of missing `reserve_code_super` and `append_jump` HOT 1
- Invalid memory address when running executable with unix/socket.fs loaded HOT 1
- Inappropriate error message in um/mod HOT 3
- [Feature request] Make possible long tap options
- Files with two dots do not work under Windows! HOT 4
- Getting up|dn|left|right arrow keys
- random.fs not compiling as expected. HOT 1
- gforth manual cannot be automatically queried HOT 2
- banner discussion HOT 9
- configure = OK but not make
- recent build failures
- Problem building both git and tarball version on MacOS Sonoma
- Question regarding embedding gforth and calling c-functions (unix/example.c) HOT 1
- unix/opengl.fs:24:9 refers to unix/gl.fs, a nonexistant file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gforth.