[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: date.js in Lua?
- From: Bertrand Mansion <lua@...>
- Date: Mon, 19 Mar 2012 23:20:20 +0100
On Mon, Mar 19, 2012 at 11:09 PM, Miles Bader <miles@gnu.org> wrote:
> Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>>> With some luck, GNU date is based on a library that can be reused.
>>
>> It's a BISON parser. The file is parse-datetime.c in GNU coreutils.
>> See a vesion at
>> http://www.nongnu.org/oath-toolkit/clang-analyzer/report-5d72bY.html
>
> The original yacc source is probably easier to read tho... :
>
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/parse-datetime.y
>
> :]
>
> [Hmm, I guess this is a job for ... LPEG!]
There is also something similar in PHP for re2c, under PHP license:
http://svn.php.net/viewvc/php/php-src/trunk/ext/date/lib/parse_date.re?revision=320481&view=markup
--
Bertrand Mansion
Mamasam