On 10/22/13 2:22 PM, 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?

Mark, you started this by describing a program that compiled to C. Now you say you are in the world of pseudo-code and flow-charts. Which is it?

In the world where actual programs get compiled and run, you need to have semantics, and they aren't expressed in an AST or a BNF. I think you think that an AST is enough, but it isn't. I'm also not sure what you actually think because we don't stay on a topic long enough to get into the details that would shed light.

It's fun to feel like you are right, and it's easy if you change the topic when the going gets tough. You've done this a number of times.

I've tried to be polite, and I've tried to be helpful, but I'm sorry: either you don't understand a lot of the terms you are throwing around, or you aren't disciplined enough to focus on a topic long enough to explain yourself. Either way, I don't know how else to move the discussion forward.

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

Reply via email to