[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

java question




Gentlemen--


Thank you much for previous help. I wrote my own preprocessor, not a
sable lexer, and fit it into the flow just like the example java parser's
preprocessor. 

I can now parse hundreds of gedcom files successfully in the sable
environment.

But I have a problem. The walker keeps getting stack overflows on
large parsed input files. I've looked at the sun (java.sun.com)
documentation for the java interpreter, but there doesn't seem to be
any options for the stack size. I used the -Xmx128m option to double
the default mem allocation, but it still bombs out in the exact same
place. 

Apparently, lists built with:

list : el
     | list el
     ;

mechanism tend to form a long chain:


list ---- list ---- list ---- list ---- list ---- .....
  \         \         \         \         \   
   \         \         \         \         \   
    el        el        el        el        el

and the walker keeps each in the stack as it progresses.
My files have thousands to tens of thousands of elements... my biggest
has about 30,000 individuals, maybe 15,000 families, and each is an
element (el) in the list... at the time of the crash, I count 8459
entries in the stack trace.

Any advice?

Also, I've noted that if I use the construct I mention above, the list
is reversed in order(as seen by the traversal). And using the ReversedDepthFirstAdapter doesn't affect
that reversed order; What's a good way to preserve the order of the input
data?



Many thanks,

murf



-- 
murf:   Steve Murphy, 	             VP Technology
        57 Lane 17        Electronic Tools Company
        Cody, Wyoming          work: (307)754-8154
                               home: (307)754-5675
        email:                    murf@e-tools.com