Question

I'm trying to get started with http://www.ibrezina.net/OracleSQL.tgz

So far, I've performed the following:

wget http://www.ibrezina.net/OracleSQL.tgz
tar xvzf OracleSQL.tgz
cd OracleSQL
make

which results in the following error:

gcc -ggdb -O0 -fno-inline -I. -I/usr/include/qt4/QtCore  -I/usr/include/qt4/QtGui  -I/usr/include/qt4  -I/home/ivan/devel/antlr-3.3/runtime/C/include  -I/home/ivan/devel/antlr-3.3/runtime/C -c OracleSQLParser.c -o OracleSQLParser.o
In file included from OracleSQLParser.c:45:0:
OracleSQLParser.h:537:23: fatal error: antlr3.h: No such file or directory
compilation terminated.
Makefile:60: recipe for target `OracleSQLParser.o' failed
make: *** [OracleSQLParser.o] Error 1

I'm not interested in building the 'c' dialect. I only want to generate the Java lexer and parser.

How can I do this?

Was it helpful?

Solution

I'm not interested in building the 'c' dialect. I only want to generate the Java lexer and parser.

How can I do this?

That grammar is not so portable: it contains a lot of embedded C code.

If you want to create a Java lexer and parser, you need to remove the language=C from the options { ... } block (defaulting to the Java target) and then translate all C code between { and } to a Java equivalent (which is quite a bit of work, I'm guessing).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top