lua-users home
lua-l archive

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


Thanks. How can i add to this grammar file {} parsing (that have all
things like directory).. ?

2012/12/7 Philipp Janda <siffiejoe@gmx.net>:
> Am 07.12.2012 09:26, schrieb Vasiliy Tolstov:
>
>> 2012/12/7 Philipp Janda <siffiejoe@gmx.net>:
>>>
>>> Here is a possible solution using LPeg:
>>
>>
>> Hmm returns error:
>> /lpeg.lua
>> /usr/bin/lua: error loading module 'grammar' from file
>> './grammar.lua':
>>          ./grammar.lua:46: too many C levels (limit is 200) in function
>> at line 36 near 'marker'
>> stack traceback:
>>          [C]: in ?
>>          [C]: in function 'require'
>>          ./lpeg.lua:3: in main chunk
>>          [C]: in function 'require'
>>          ./grammar.lua:1: in main chunk
>>          [C]: in function 'require'
>>          ./lpeg.lua:3: in main chunk
>>          [C]: in function 'require'
>>          ./grammar.lua:1: in main chunk
>>          [C]: in function 'require'
>>          ...
>>          [C]: in function 'require'
>>          ./lpeg.lua:3: in main chunk
>>          [C]: in function 'require'
>>          ./grammar.lua:1: in main chunk
>>          [C]: in function 'require'
>>          ./lpeg.lua:3: in main chunk
>>          [C]: in function 'require'
>>          ./grammar.lua:1: in main chunk
>>          [C]: in function 'require'
>>          ./lpeg.lua:3: in main chunk
>>          [C]: in ?
>>
>
> You probably shouldn't call your test file 'lpeg.lua', since grammar.lua
> uses require( "lpeg" ) to load the lpeg library (from lpeg.so/.dll) and you
> get a require-loop ...
>
> Philipp
>
>
>
>



-- 
Vasiliy Tolstov,
Clodo.ru
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru