As I see it, it's a two step process. First, the bigger, you have a database for the standar functions, procedures and classes. Second, you parse the user sources to add her new classes, functions and procedures. The second step can be done when you parse the code for highlights for example.