Python Front-end to GCC

Mark Janssen dreamingforward at gmail.com
Tue Oct 22 14:16:54 EDT 2013


>>>> So which of you is confused?  I ask that in the inclusive (not
>>>> exclusive OR) sense.... ;^)  <-- face says "both".
>>>
>>> Could you please be less snarky?
>>
>> 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.
>
> Hmm, I don't hear the boom yet.  An Abstract Syntax Tree is a tree
> representation of a program.  To use my previous example: the program "123
> *!? 456" would become a tree:
>
>     op: "*!?"
>         num: 123
>         num: 456
>
> There's still not enough information to compile this.

....Is your language Turing complete?

-- 
MarkJ
Tacoma, Washington



More information about the Python-list mailing list