Chapter 10. PLVprs, PLVtkn, and PLVprsps: Parsing Strings

Parsin g a computer program can be a very frustrating and complex experience. There are all kinds of exceptions to the rules and special rules to handle in one's logic. The only way I could handle all of these details was to deal with as narrow a portion of functionality at a time as I could. The result is a set of four different packages oriented to different levels of the parsing process. By isolating various areas of complexity into these different packages, I can keep each of the individual parsing programs brief and relatively easy to write and understand.

PL/Vision offers several different string and source code parsing packages:

PLVprs

Generic string-parsing extensions to PL/SQL. This is the lowest level of string-parsing functionality and will prove useful in many different situations.

PLVtkn

Interface to the PLV_token table, which contains more than 1,200 keywords of the PL/SQL language, including those for Oracle Forms. Use PLVtkn to determine if an identifier is a keyword.

PLVlex

PL/SQL lexical analysis package. Performs similar parsing actions as those available in PLVprs, but does so with an awareness of the syntax and delimiters of the PL/SQL language.[1]

[1] This package is not described further in the book; see the the companion disk (view disk content online at http://examples.oreilly.com/advoracle) for more information.

PLVprsps

Highest-level package to parse PL/SQL source code (hence the prsps name) into ...

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.