Oracle 10g has introduced a new "Q" function that allow convenient enclosure of strings containing single-quotes within a different set of string delimiters so you don't have to double the single-quotes to get a single literal one in the string value. For example...
string1 VARCHAR2(100) := 'That''s all folks';
is the same as
string2 VARCHAR2(100) := Q'"That's ALL folks"';
string3 VARCHAR2(100) := Q'[That's ALL folks]';
string4 VARCHAR2(100) := Q'(That's ALL folks)';
string5 VARCHAR2(100) := Q'{That's ALL folks}';
string6 VARCHAR2(100) := Q'<That's ALL folks>';
string7 VARCHAR2(100) := Q'~That's ALL folks~';
etc...
Nothing really parses this very well, but neither does PLDoc so I figured I'd pass this along.
Parsing file kaboom2.pks ...
ParseException at package <kaboom2.pks>: net.sourceforge.pldoc.parser.ParseException: Encountered "\'\"\r\nThis string uses THE NEW Q FUNCTION!\r\n\"\'" at line 3, column 40.
Was expecting one of:
"/" ...
<...stuff omitted for brevity...>
":=" ...
Last consumed token: "Q"
net.sourceforge.pldoc.parser.ParseException: Encountered "\'\"\r\nThis string uses THE NEW Q FUNCTION!\r\n\"\'" at line 3, column 40.
Was expecting one of:
"/" ...
<...stuff omitted for brevity...>
":=" ...
at net.sourceforge.pldoc.parser.PLSQLParser.generateParseException(PLSQLParser.java:10862)
at net.sourceforge.pldoc.parser.PLSQLParser.jj_consume_token(PLSQLParser.java:10721)
at net.sourceforge.pldoc.parser.PLSQLParser.variableOrConstantDeclaration(PLSQLParser.java:5331)
at net.sourceforge.pldoc.parser.PLSQLParser.declarativeSection(PLSQLParser.java:1510)
at net.sourceforge.pldoc.parser.PLSQLParser.packageSpec(PLSQLParser.java:723)
at net.sourceforge.pldoc.parser.PLSQLParser.input(PLSQLParser.java:399)
at net.sourceforge.pldoc.PLDoc.processPackage(PLDoc.java:391)
at net.sourceforge.pldoc.PLDoc.run(PLDoc.java:172)
at net.sourceforge.pldoc.PLDoc.main(PLDoc.java:109)
Package kaboom2.pks skipped.
An illustrative sample file is attached.
Package containing new 10g Q function.
Test Case pldoc-1606392.sql
Fixed