Talk:BNF Grammar: Difference between revisions

→‎Tcl's BNF: new section
(→‎Tcl's BNF: new section)
Line 44:
 
This is not a task. Moreover, being the grammars hardly works made by "us", we should check if their inclusion here is compatible with the GFDL. I suppose it should be so for any lang, but never say never. --[[User:ShinTakezou|ShinTakezou]] 15:05, 21 June 2009 (UTC)
 
== Tcl's BNF ==
 
Though it is possible to define a BNF grammar for Tcl, I have chosen to not do so. This is because the level at which such a grammar operates is so low level that nobody thinking about the language actually uses it. Instead, to understand the language requires understanding a higher level of processing which is the currently defined set of commands in the language, all of which can be replaced with something else and all of which have total freedom to reinterpret their arguments any way they want. In many real ways, Tcl is fundamentally a context-sensitive language and not a context-free one, and BNF is not the right tool for describing it.
 
FWIW, the portion of the language that can be described in a context-free way is the language basic parser, as documented in [http://www.tcl.tk/man/tcl8.6/TclCmd/Tcl.htm Tcl(n)], but that is only one very small part of the whole. To write a BNF in for this “task” would be a sham. —[[User:Dkf|Donal Fellows]] 22:39, 21 June 2009 (UTC)
Anonymous user