Python Front-end to GCC
Mark Janssen
dreamingforward at gmail.com
Tue Oct 22 14:22:41 EDT 2013
>> 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?
--
MarkJ
Tacoma, Washington
More information about the Python-list
mailing list