lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


If I understand it properly, according to the grammar at the end of
the reference manual,
the following statement should be legal (although it isn't in practice):

a = function() break end

Here are the relevant entries:

	function ::= `function´ funcbody
	funcbody ::= `(´ [parlist] `)´ block `end´
	block    ::= chunk
	chunk    ::= {stat [`;´]} [laststat [`;´]]
	laststat ::= `return´ [explist] | `break´

I'm a self thought programmer, so my grasp of theoretical CS is a bit
hazy. Does the bug lie in the spec or in my mind?

-- Pierre-Yves