Menu

#60 Parser fails with "show errors package ..."

open
nobody
None
5
2006-09-28
2006-09-19
Anonymous
No

It is not possible to parse package-files with lines
witch starts with:
"set echo off"
"prompt"
"rem"
"show errors"
Such Lines should be ignored.

The "-definesfile <filename>" doesnt help, because "set
echo off" cant be displaced by e.g. "--", because there
are whitespace in. Also i cant displace "set" because
it may be, that the string ist part of an method-name.

Are there any solutions?

Discussion

  • Albert Tumanov

    Albert Tumanov - 2006-09-19

    Logged In: YES
    user_id=86901

    It should work.
    Can you please provide an example input file
    and pldoc output with errors ?

     
  • Nobody/Anonymous

    Logged In: NO

    Example:

    call pldoc.bat -definesfile ../conversion.txt -d ../pldoc
    ../code/*.sql

    conervsion.txt should do following e.g.: "set echo off=--"
    should work as Workaround, to remove special lines
    but only "set=--" may be replaced.

     
  • Albert Tumanov

    Albert Tumanov - 2006-09-21

    Logged In: YES
    user_id=86901

    I need an INPUT FILE with the SQL

     
  • Nobody/Anonymous

    Logged In: NO

    set echo off
    prompt BAR
    prompt FOO
    rem
    rem Description

    create or replace package
    pck_kba_nummern as

    function set_kba_wert(
    hersteller_schluessel_nr kba_nummern.kban_nummer_1%type
    ,typ_schluessel_nr kba_nummern.kban_nummer_2%type
    ,spalte varchar2)
    return varchar2;

    end;
    /

    create or replace package body pck_kba_nummern as

    /** BAR.
    * FOOOOOOOOOO
    * @param hersteller_schluessel_nr Hersteller-Nummer
    */
    FUNCTION set_kba_wert(
    hersteller_schluessel_nr kba_nummern.kban_nummer_1%type
    ,typ_schluessel_nr kba_nummern.kban_nummer_2%type
    ,spalte varchar2)
    return varchar2
    IS
    begin
    return 'TEST';
    end;

    end;
    /
    show errors package pck_kba_nummern
    show errors package body pck_kba_nummern

     
  • Nobody/Anonymous

    Logged In: NO

    Any solutions?

     
  • Albert Tumanov

    Albert Tumanov - 2006-09-28
    • summary: Parser fails if "set echo off", "prompt", ... --> Parser fails with "show errors package ..."
     
  • Albert Tumanov

    Albert Tumanov - 2006-09-28

    Logged In: YES
    user_id=86901

    To resolve the bug, some grammar changes are needed,
    and those are not easy to do.

    Workaround:
    replace "show errors package ..." with "show errors" in your
    code.

     
  • Nobody/Anonymous

    Logged In: NO

    Any solutions?

     
  • Nobody/Anonymous

    Logged In: NO

    That's no good solution. It's a pity. PLDOC seemed to look
    so fine.

     
  • Albert Tumanov

    Albert Tumanov - 2006-09-29

    Logged In: YES
    user_id=86901

    Try the attached version (replace pldoc.jar in your directory)

     
  • Albert Tumanov

    Albert Tumanov - 2006-09-29

    New version

     
  • Nobody/Anonymous

    Logged In: NO

    Hello, following error occurs:

    PLDoc version: (experimental)
    Parsing file ../code/pck_kba.sql ...
    Error parsing line 11, column 42
    Last consumed token: "hersteller_schluessel_nr"
    net.sourceforge.pldoc.parser.ParseException: Encountered
    "kba_nummern" at line 1
    1, column 42.
    Was expecting one of:
    "(" ...
    ";" ...
    "AS" ...
    "DETERMINISTIC" ...
    "IS" ...
    "PARALLEL_ENABLE" ...
    "PIPELINED" ...
    "RETURN" ...

     
  • Albert Tumanov

    Albert Tumanov - 2006-09-29

    Logged In: YES
    user_id=86901

    Show me the pck_kba.sql ....

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.