How to know a functions names in a file.

India
March 28, 2008 10:05pm CST
I have a text file. in this file i have writen a pl/sql procedure so i have to read all the function name and number of argument in that function using Java plz any one can help me out Thanks in advance
2 responses
@mr_mlk (364)
6 Aug 08
So you have a text file containing PL/SQL functions and you want to parse it in Java to display the function names? I think this would be quite a hard task and I would look into using JavaCC to build up a basic parser for the language. You might however get away with just some simple String checks. I.e. Is current word function. Then the next word is function name. That is followed by "(" followed by argumnets followed by ")". Ignore words until "function".
• India
29 Mar 08
Very sorry but I can't get your question properly. please be a much descriptive... I think , you have written a .java file , some methods are there for connecting to a database and you want to use those methods later for retrieving data from the database. I think this link would be helpful for you.. http://www.java2s.com/Code/Java/Database-SQL-JDBC/CatalogDatabase-SQL-JDBC.htm