[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bash script to strip comments?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 9 Nov 2010 11:34:00 -0200
> is there anyone who hash a script (bash or others) that takes a .lua file
> and strips out all the comments (block, multiline, single line) ?
This is hard to do right with regular expressions. Better use the Lua lexer.
See for instance LuaSrcDiet and my lstrip:
http://luasrcdiet.luaforge.net/
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lstrip