On 22/10/2013 19:22, Mark Janssen wrote:
Okay.  The purpose of BNF (at least as I envision it) is to
produce/specify a *context-free* "grammar".  A lexer parses the tokens
specified in the BNF into an Abstract Syntax Tree.  If one can produce
such a tree for any given source, the language, in theory, can be
compiled by GCC into an executable.

Boom.

But you still need to specify the semantics.

In my world, like writing pseudo-code or flow-charts, the AST *is* the
semantics.  What world are you guys from?

The real world. :-)

So what you're saying is that you generate an AST where there are
certain pre-defined operations (primitives?) available?

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to