[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Parser
- From: Erik Hougaard <erik@...>
- Date: Tue, 17 Jul 2012 22:16:24 -0400
On 17-07-2012 21:40, Igor Medeiros wrote:
i am sorry for ask something like this, but i did not understand which
function of lpeg i should use to parser a string which contains a lua
local code = [[
--some lua code here
i tried print(lpeg.match(lpeg.P(lua), code)) but it prints just the
index of first character after the match or nil if the match does not
I need a error message like those showed by lua interpreter when it
find a syntactic error, instead the nil value printed .
How can i get this errors messages using the lpeg and the Lua Parser
code found on this page http://lua-users.org/wiki/LpegRecipes?
Am I missing the point, or do you just need to use the standard function
loadstring ( http://www.lua.org/pil/8.html ) ?