LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
Hans Aberg <[log in to unmask]>
Date:
Mon, 15 Jan 2001 11:20:28 +0100
In-Reply-To:
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (26 lines)
At 14:50 -0500 1-01-06, William F. Hammond wrote:
>Although I've written in C, I've never gotten into C++.  Are there
>good regular expression libraries for C++?

I once wrote a regular expression -> NFA translator. If one wants to
translate into a DFA, one problem is that some regular words produces
exponential size DFA's. One way around this is to translate DFA transitions
dynamically, in which case both size and time can be made fast (space as
NFA, time as DFA).

I have never seen any such libraries, but they must exist, as there are
programs like grep and the like, which uses regular expression and must use
some kind of FA (finite automata) for string identification.

In your case, I think you want to attach rules to the parsing, so parser
generateors seem to be better. In addition, you probably have a limited
amount of programmer time at your disposal. So this speaks for relying on
existing parser generators. Once one knows what is needed, one can choose
other alternatives as a means of optimization.

If one does not want to use C/C++, there is a parser generator in Haskell
http://haskell.org/, called "Happy" I think. And for Java, there is ANTLR
http://www.antlr.org/.

  Hans Aberg

ATOM RSS1 RSS2