5.22. PLVprsps: PL/SQL Source Code Parsing

The PLVprsps (PL/Vision PaRSe PL/SQL) package is a more specialized string parser than PRSprs; it parses PL/SQL source code into its separate atomics. See Chapter 10 for details.

5.22.1. Package constants

The following constants are used to specify the types of tokens to be preserved when PL/SQL source code is parsed.

c_all_tokens CONSTANT VARCHAR2(1) := 'A';

Specifies "all tokens".

c_kw_tokens CONSTANT VARCHAR2(1) := 'K';

Specifies "keywords only".

c_nonkw_tokens CONSTANT VARCHAR2(1) := 'N';

Specifies "non-keywords only" or application-specific identifiers.

c_bi_tokens CONSTANT VARCHAR2(1) := 'B';

Specifies keywords that are builtins.

5.22.2. Specifying tokens of interest

PROCEDURE keep_all;

Specifies that when a PL/SQL string is parsed, all tokens are to be kept (stored in a PL/SQL table).

PROCEDURE keep_kw;

Specifies that when a PL/SQL string is parsed, only keywords are to be kept.

PROCEDURE keep_nonkw;

Specifies that when a PL/SQL string is parsed, only non-keywords are to be kept.

PROCEDURE keep_bi;

Specifies that when a PL/SQL string is parsed, only keywords that are builtins are to be kept.

PROCEDURE nokeep_all;

Specifies that when a PL/SQL string is parsed, all tokens are to be ignored.

PROCEDURE nokeep_kw;

Specifies that when a PL/SQL string is parsed, all keywords are to be ignored.

PROCEDURE nokeep_nonkw;

Specifies that when a PL/SQL string is parsed, only non-keywords are to be ignored.

PROCEDURE nokeep_bi; ...

Get Advanced Oracle PL/SQL Programming with Packages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.