Skip to main content
13 votes
Accepted

Why does Forth's flexibility make a grammar inappropriate for it?

A "normal" word is pretty much just a subroutine. ...but you can write a user-defined defining word, which change how the compiler works. For example, a definition normally starts with a colon (":") ...
Jerry Coffin's user avatar
  • 44.8k
7 votes

Why does Forth's flexibility make a grammar inappropriate for it?

In Forth, you can run code at compile time. In particular, you can run code that consumes words from the input. For example, you could write a C compiler in Forth, and then call it at compile-time, ...
Stack Exchange Broke The Law's user avatar
3 votes

Why does Forth's flexibility make a grammar inappropriate for it?

A typical approach involving use of a BNF style grammar implies creation of some sort of tokenizer → parser → generator chain where grammar will be used by parser to form Abstract Syntax Tree from ...
user7860670's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible