help-bison
[Top][All Lists]
Advanced

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

Re: How can I fix it?


From: Hans Aberg
Subject: Re: How can I fix it?
Date: Mon, 2 Jun 2003 20:13:26 +0200

At 16:13 +0200 2003/06/02, address@hidden wrote:
>I have read from help-bison list you are working with a grammar that uses
>dates.
>
>I'm looking for a Date grammar or something that allow parsing dates.
>
>Could you help me? Do you know where can I get this grammar?

No I am not doing anything like that: Once you have figured out to set up a
Flex/Bison lexer/parser combination and know what date formats you want to
parse, it should be essentially trivial to do it. If the formats you want
to parse are simple, Flex alone may suffice. Alternatively, if you do not
have a large language to parse, you may take say the calculator example in
the Bison manual and successively modify it to parse dates instead. You get
info about Flex at:
  Help-flex mailing list
  address@hidden
  http://mail.gnu.org/mailman/listinfo/help-flex

If you want to compute the time distance between dates, one way to it by
converting all dates and times to say UTF relative a fixed date, such as in
the Julian period (starting at 1 Jan, -4712). I once wrote some routines
for that in C++. I think some such routines may be part of the library of
the latest C99.

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]