[antlr-interest] Re: [PROBLEM] Grammar is too big for Visual C++ 7 ?
micheal_jor
open.zone at virgin.net
Tue Sep 30 05:53:48 PDT 2003
Hi Ruslan,
> Hi Guys,
>
> We have stick into problem that our file of our Valentina SQL grammar
> VSQL_TreeParser.cpp
>
> Generated by ANTLR, is probably so big, that Visual 7.....
<SNIP>
You may want to investigate the grammar-level code generation options:
a. codeGenBitsetTestThreshold and,
b. codeGenMakeSwitchThreshold
Option (a) in particular can shrink the size of generated code as it
controls the threshold for replacing those long if-else-if comparisons
with compact BitSet tests.
> This bring us to 2 questions/issues/ideas:
>
> 1) anybody know options to say Visual use bigger symbol tables?
>
> 2) Terr, may be there is sense add to ANTLR option split generated
functions
> in few files somehow ?
I will be probably be adding feature (2) into C# code-generation in
the distant near future using partial types. Of course C++ (with a
little help from the out-of-favour preprocessor) already "supports"
partial types with code like:
class GeneratedClass
{
...
#include "partial_decls_1.h"
#include "partial_decls_2.h"
#include "partial_decls_3.h"
...
};
Cheers,
Micheal
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list