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

Advanced Oracle PL/SQL Programming with Packages

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

5.26. PLVtkn: Token Table Interface

The PLVtkn (PL/Vision ToKeN) package provides an interface to the PLV_token table; the package examines this table to determine whether an identifier is a keyword. See Chapter 10 for details.

5.26.1. Package constants

c_any CONSTANT CHAR(1) := '%';
c_syntax CONSTANT CHAR(1) := 'X';
c_builtin CONSTANT CHAR(1) := 'B';
c_symbol CONSTANT CHAR(1) := 'S';
c_exception CONSTANT CHAR(1) := 'E';
c_datatype CONSTANT CHAR(1) := 'D';
c_datadict CONSTANT CHAR(2) := 'DD';
c_sql CONSTANT CHAR(3) := 'SQL';

Each of these constants specify a different type of token or reserved word in the PL/SQL language (except for c_any, of course). They match the values found in the PLV_token_type table. They are used by various programs in the PLVtkn package.

c_plsql CONSTANT CHAR(1) := '%'; /* = c_builtin */
c_od2k CONSTANT CHAR(4) := 'OD2K';
c_of CONSTANT CHAR(2) := 'OF';
c_or CONSTANT CHAR(2) := 'OR';
c_og CONSTANT CHAR(2) := 'OG';

These constants identify different categories or sets of reserved words for the PL/SQL language. The identifier SHOW_ALERT is, for example, a builtin in Oracle Forms, but has no significance in the stored PL/SQL code. Currently PL/Vision is aware of stored PL/SQL and Oracle Forms reserved words only.

5.26.2. The keyword record TYPE

TYPE kw_rectype IS RECORD
    (token PLV_token%token,
    token_type PLV_token%token_type, 
    is_keyword BOOLEAN);

A PL/SQL record TYPE defining a record holding information about a token.

5.26.3. Determining type ...

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 PL/SQL Practices for Oracle Developers and DBAs

Expert PL/SQL Practices for Oracle Developers and DBAs

John Beresniewicz, Adrian Billington, Martin Büchi, Melanie Caffrey, Ron Crisco, Lewis Cunningham, Dominic Delmolino, Sue Harper, Torben Holm, Connor McDonald, Arup Nanda, Stephan Petit, Michael Rosenblum, Robyn Sands, Riyaj Shamsudeen

Publisher Resources

ISBN: 1565922387Supplemental ContentCatalog PageErrata