start page | rating of books | rating of authors | reviews | copyrights

Advanced Oracle PL/SQL Programming with Packages

Advanced Oracle PL/SQL Programming with PackagesSearch this book
Previous: 5.15 PLVio: Input/Output Processing Chapter 5
PL/Vision Package Specifications
Next: 5.17 PLVlog: Logging Facility
 

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 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 string from the perspective of a line of PL/SQL source code.

PROCEDURE get_next_token
(line_in IN VARCHAR2,
start_pos_in IN VARCHAR2,
token_out IN OUT VARCHAR2,
new_start_pos_out IN OUT INTEGER,
skip_spaces_in IN BOOLEAN,
line_len_in IN INTEGER := NULL,
full_qualified_name_in IN BOOLEAN := FALSE);

Gets the next PL/SQL token (which could be composed of multiple atomics) from the string.


Previous: 5.15 PLVio: Input/Output Processing Advanced Oracle PL/SQL Programming with Packages Next: 5.17 PLVlog: Logging Facility
5.15 PLVio: Input/Output Processing Book Index 5.17 PLVlog: Logging Facility

The Oracle Library Navigation

Copyright (c) 2000 O'Reilly & Associates. All rights reserved.

Library Home Oracle PL/SQL Programming, 2nd. Ed. Guide to Oracle 8i Features Oracle Built-in Packages Advanced PL/SQL Programming with Packages Oracle Web Applications Oracle PL/SQL Language Pocket Reference Oracle PL/SQL Built-ins Pocket Reference