|First Order Logic (FOL) parsing Erotavlas_turbo@libero.it (2010-12-07)|
|Re: First Order Logic (FOL) parsing email@example.com (Hans Aberg) (2010-12-10)|
|Re: First Order Logic (FOL) parsing firstname.lastname@example.org (Gene) (2010-12-10)|
|Re: First Order Logic (FOL) parsing email@example.com (2015-05-03)|
|From:||Hans Aberg <firstname.lastname@example.org>|
|Date:||Fri, 10 Dec 2010 20:27:13 +0100|
|Organization:||A noiseless patient Spider|
|Posted-Date:||14 Dec 2010 20:35:05 EST|
On 2010/12/07 09:49, Erotavlas_turbo@libero.it wrote:
> I'm new about the topic of parsing. I have to develop a parser/compiler for
> First Order Logic (FOL) clauses in C/C++ language. I have made a lot of search
> on the web but I have found only a source codes written in ML, PROLOG,
> Haskell, Python, etc.
There is Otter
And Qu-Prolog looked interesting (don't recall implementation language):
Some other links:
> At the moment I'm studying Flex and Bison to understand how I can generate a
> parser. I think it's a big work for me.
It depends on what you mean by "first order logic". If it involves
quantifiers that bind variables, that is a lot of tricky work to get it
correct. So it is best to settle on some library that can do that for
you, if such one exists.
If you merely want Prolog style free variables, then the Haskell
interpreter Hugs has a mini-Prolog example. I once translated it into C++.
As for getting started with Bison/Flex, try the C++ calculator example
in the Bison manual, which also comes in the distribution. Then it is
easy to rewrite it.
Return to the
Search the comp.compilers archives again.