Skip to Main Content
Advanced Oracle PL/SQL Programming with Packages
book

Advanced Oracle PL/SQL Programming with Packages

by Steven Feuerstein
October 1996
Intermediate to advanced content levelIntermediate to advanced
687 pages
16h 41m
English
O'Reilly Media, Inc.
Content preview from Advanced Oracle PL/SQL Programming with Packages

5.16. PLVlex: Lexical Analysis

The PLVlex (PL/Vision LEXical analysis) package provides generic string-parsing extensions to PL/SQL; these extensions include an awareness of the syntax and delimiters of the PL/SQL language. See the companion disk (see http://examples.oreilly.com/advoracle) for details.

5.16.1. Analyzing PL/SQL string content

FUNCTION is_delimiter (character_in IN VARCHAR2, exclude_in IN VARCHAR2 := NULL) 
RETURN BOOLEAN;

Returns TRUE if the string is a PL/SQL delimiter.

FUNCTION is_oneline_comment (token_in IN VARCHAR2) RETURN BOOLEAN;

Returns TRUE if the string is a single-line comment indicator (a double hyphen).

FUNCTION starts_multiline_comment (token_in IN VARCHAR2)
RETURN BOOLEAN;

Returns TRUE if the string is equal to /*, which signals the start of a multiline or block comment.

FUNCTION ends_multiline_comment (token_in IN VARCHAR2)
RETURN BOOLEAN;

Returns TRUE if the string is equal to */, which signals the end of a multiline or block comment.

5.16.2. Scanning PL/SQL strings

FUNCTION next_atom_loc
    (string_in IN VARCHAR2, start_loc_in IN NUMBER)
RETURN NUMBER;

Returns the location of the beginning of the next PL/SQL atomic in the string.

PROCEDURE get_next_atomic
     (line_in IN VARCHAR2,
     start_pos_in IN VARCHAR2,
     atomic_out OUT VARCHAR2,
     new_start_pos_out OUT INTEGER,
     line_len_in IN INTEGER := NULL);

Gets the next PL/SQL atomic from the string. This procedure builds upon PLVlex.next_atom_loc and several low-level PLVprs functions to scan the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Database 12c PL/SQL Programming

Oracle Database 12c PL/SQL Programming

Michael McLaughlin
Oracle PL/SQL for DBAs

Oracle PL/SQL for DBAs

Arup Nanda, Steven Feuerstein
Expert Oracle PL/SQL

Expert Oracle PL/SQL

Ron Hardman, Michael McLaughlin

Publisher Resources

ISBN: 1565922387Supplemental ContentCatalog PageErrata