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

Re: Any idea to reduce the AST size?



Hi Welson,

SableCC 3's CST->AST feature was introduce in part to reduce memory
consumption at parse time, if the final AST is much smaller than the full
CST.

Mainly, to reduce the AST size, you must define an AST grammar that only
retains essential elements of the CST.  You should look at Kevin's
expression grammar example, for some insight on how to do this.  I think
it is inluded in the SableCC package.  If not, ask Kevin for it
(agbakpem.kevin@courrier.uqam.ca I think) [His usual email kevin@larc.info.uqam.ca
is very temporarily broken, because we are moving the lab].

Etienne

Welson Sun wrote:
I am writing an EDIF parser with SableCC and it works fine until it reads in
some huge Edif file ( like those big designs for Virtex FPGA), the AST will
occupy several hundred megabytes memory !!! I am wondering if there is a way
to reduce the AST size, othersize I have to switch to JavaCC, but I am not
sure how much memory improvement I will get from JavaCC.

Yours,

Welson Sun

----------------------------------------
1285 N Freedom Blvd Apt 15
Provo, UT, 84604

Home:   (801) 343 2515
Office: (801) 422 7206
Email:  welson_sun@yahoo.com
MSN:    welson_sun@hotmail.com
------------------------------------------






--
Etienne M. Gagnon, Ph.D.             http://www.info.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/