In essence, I'm wondering how licenses affect the legality of using source code as data. By that I mean literally storing code in a database as strings and using it e.g. for some syntax highlighting experiments, or other such pursuits.
I can think of a couple of scenarios:
My project is closed-source, and I want to use open-source code as data. If I store code that is under GPL, does the GPL license apply to my project? What about other licenses?
My project is open-source, but licensed under e.g. MIT. Again, if I store GPL code, does that affect my project?
I was thinking about GPL specifically because of its viral nature, but if other licenses would have applicable effects, I'd be interested in hearing about them as well.