2 ms·
> Who is going to use a gigebyte sized source file? I used to mess around with the ROSE C++ source-to-source transformation framework (http://rosecompiler.org/
by tom_mellior 9y ago
> Who is going to use a gigebyte sized source file?
I used to mess around with the ROSE C++ source-to-source transformation framework (http://rosecompiler.org/ http://rosecompiler.org/). One of the files in there (defining the AST structure for representing C++ programs) was about 100,000 lines of autogenerated code. It wasn't heavily templated, I think, but it did pull in a bunch of standard C++ headers. I could imagine the whole preprocessed thing approaching a gigabyte.
- fjfaase 9y agoYes, parsing generated source code might be a problem, and yes, C++ preprocessing adds a lot as well. But even 100,000 lines of 80 characters whould still be (a little less than) 8 Mbyte. I did not design my interpretting parser with maximum performance as a goal, but just to have a parser that is easy to use and allows for much flexibility with respect to the grammar specification. I feel that it is a good parser for domain specific languages.
- tom_mellior 9y ago> even 100,000 lines of 80 characters whould still be (a little less than) 8 Mbyte Um, you're right of course. I did do the same math in my head but somehow got confused by two orders of magnitude.