On 27 Oct 2006, at 17:59, Joerg Hoffmann wrote:
how do I get my bison/flex parser to parse bigger files? Is there
some way to control maximal sizes, e.g. the maximal number of items
parsed into a list, or so?
I'm using Bison 1.875 and flex 2.5.4. with newer versions of bison,
my parser does not compile. The file I want to parse is not
exaggeratedly long, only just over 1000 lines. A few years ago, I
did manage to configure the parser and/or the bison, on some other
computer, to parse much bigger files in the order of many MBytes.
So I know this is possible in principle. I have compared the two
parsers (their .y source code) and cannot see a discernible
difference that could account for the ability to parse larger
files. Does the particular Linux version used have any influence on
this?
I don't know if this is of any help, but I attach the two .y files
just in case. Note that the two parsers differ in various details
of what exactly is parsed, so I can't try out what happens if I
replace them,
I compiled the first of them in Bison 2.3a (using --verbose to get
the '.output' file), and just got a shift/reduce conflict in state
116. You may try to remove it by setting token precedences (%left
etc.) on the token before and after the '-' in the conflicting rules,
i.e., NOT_TOK, CLOSE_PAREN.
state 116
56 literal_term: OPEN_PAREN NOT_TOK atomic_formula_term .
CLOSE_PAREN
57 | atomic_formula_term .
CLOSE_PAREN shift, and go to state 136
CLOSE_PAREN [reduce using rule 57 (literal_term)]
Hans Aberg
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison