tldm-universe/Ardent/UV/gcidir/include/basic.h

104 lines
3.8 KiB
C
Raw Normal View History

2024-09-09 21:51:08 +00:00
#ifndef h_basic
#define h_basic
/******************************************************************************
*
* Declarations for basic compiler
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intented
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 03/15/99 24695 JSM Added dolcomments for $* comments text.
* 10/14/98 23801 SAP Change copyrights.
* 09/13/96 18374 FTW Increase the MAX number of nested includes to 100.
* 05/12/94 13836 RM Add TOK_MAX for yydisp and tokgen
* 03/08/94 12297 JSW Add LEX_ROL for $DEFINE processing
* 02/10/93 10389 DPB Remove memory leaks when compiling many programs.
* 06/21/93 11417 CSM Increase word text length for ODBC keywords
* 05/11/93 11417 JWT Allow functions to require lvalues for arguments
* 11/14/89 6183 JWT Longer variable name support
* 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10.
*
*****************************************************************************/
#include "compiler.h"
#define INCL_MAX 101
#define TOK_MAX 600
/************************************************************************
* *
* Reserved Word table format *
* *
************************************************************************/
#define WORDDEF struct worddef
struct worddef
{
char text[20]; /* The word */
uchar lexcmd; /* Lexical flag (see above) */
short lexeme; /* Lexeme to return to the parser */
uchar disable; /* Word has been disabled by the parser */
uchar minarg; /* Minimum arguments (functions only) */
uchar maxarg; /* Maximum arguments (functions only) */
uchar optarg; /* Optional arguemnt flag (functs only) */
int lvalargs; /* flags to identify arguments which
must be lvalues */
int opcode; /* Opcode
* Opcode number for functions
* Keyword flag for keywords
*/
};
extern WORDDEF word[]; /* The reserved word table */
/************************************************************************
* *
* Lexical flags *
* *
************************************************************************/
#define LEX_AT 0x0001 /* Don't look for @ or $ Variables */
#define LEX_DOT 0x0002 /* Trim off trailing '.' from tokens */
#define LEX_RW 0x0004 /* Don't scan the reserved word table */
#define LEX_STR 0x0008 /* Return token as a string */
#define LEX_PAREN 0x0010 /* Don't look for '(' after NEWVERIABLE */
#define LEX_LABEL 0x0020 /* Don't scan for labels */
#define LEX_ROL 0x0040 /* return up to EOL as string */
/************************************************************************
* *
* Flags to be passed to *GET to control what it does *
* *
************************************************************************/
#define ugINIT 1
#define ugGET 2
#define ugSEEK 3
#define ugEOF 4
/************************************************************************
* *
* External variable declarations *
* *
************************************************************************/
extern int strc,
subrmark,
leof;
extern int srcln;
extern char yytext[];
extern int yyerrflag;
extern STRING copyright;
extern STRING dolcomments;
extern SYMDEF *symbol, /* The symbol table */
init_symbol[]; /* The initial pre-defined symbol table */
extern void lex_reject(),
lex_state(),
lex_flush(),
lex_nlstate();
#endif /* end of basic.h */