python - What's a good resource for starting to write a programming language, that's not context free? -
i'm looking write programming language fun, of resource have seen writing context free language, wish write language that, python, uses indentation, understanding means can't context free.
a context-free grammar is, simply, 1 doesn't require symbol table in order correctly parse code. context-sensitive grammar does.
the d programming language example of context free grammar. c++ context sensitive one. (for example, t*x declaring x pointer t, or multiplying t x ? can tell looking t in symbol table see if type or variable.)
whitespace has nothing it.
d uses context free grammar in order simplify parsing it, , simple tools can parse (such syntax highlighting editors).
Comments
Post a Comment