Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: omit comments in PL/SQL source code
"Norman Dunbar" <Norman_at_JUNKTHISBIT.Bountiful.Demon.co.uk> wrote in message
news:pu59c01cv9hl9eqeflhpu2gq9c4akv3uno_at_4ax.com...
> On 7 Jun 2004 08:44:41 -0700, b_at_buko.sk (Ivan Bukovcan) wrote:
>
> >Hi,
> >
> >I have this situation:
> >I am doing simple parser to parse PL/SQL packages and create some
> >metadata from it.
> >I select the package source from SYS.ALL_SOURCE view.
>
> Sounds like fun .....
Each to his own I suppose.
>
> >
> >My question is:
> >Is it possible to omit all comments (both /**/ and -- ) in the source
> >code, so my parser would not have to parse them? There may be large
> >blocks of commented source which I dont want to be parsed, I want to
> >skip it.
> >
> >Is there some way to do this or do I have to create "comments parser"
> >to get rid of all the comments in the source?
>
> Nope. You have to write a comments parser. Not too difficult as there
> are only a couple oc comment markets.
<snip>
>
> If current char = '/' and next char = '*' the ignore everything until
> '*/' detected.
What you mean you don't write code like
create or replace procedure insult(p_name in varchar2,p_insult in varchar2)
as
cursor c is select /*+ ORDERED */ a.* from sys.obj$ a,sys.obj$ b;
begin
for i in c loop
dbms_output.put_line(p_name||' you are the son of a '||p_insult||',
please remember hint syntax');
end loop;
end;
/
or in other words I think you forgot hints.
-- Niall Litchfield Oracle DBA http://www.niall.litchfield.dial.pipex.comReceived on Mon Jun 07 2004 - 16:38:08 CDT
![]() |
![]() |