tldm-universe/Ardent/UV/INCLUDE/SYMBOLINS.H

45 lines
1.7 KiB
C++
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
*******************************************************************************
*
* uniVerse include file SYMBOLINS.H
*
* 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 intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenance log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 11/12/92 10214 PVW Port PI/open verbs to uniVerse.
*
*******************************************************************************
*
* Place entries in symbol table.
* Equivalent to the following subroutine:
* SUBROUTINE SYMBOL (TOKEN, SYMBOL.VALUE, POS, SYMBOLS)
* Assumes '$INSERT SYMBOL.TBL'
*
*******************************************************************************
LSYMBOL:
POS = INDEX(SYMBOLS (SYMBOL.VALUE), @FM:TOKEN:@VM, 1)
IF POS > 0 THEN
POS = EXTRACT(SYMBOLS (SYMBOL.VALUE) [POS + LEN(TOKEN) + 2, 4], 1, 1, 0)
END ELSE IF TOKEN # '' AND 'A':TOKEN = 'A':EXTRACT(SYMBOLS (SYMBOL.VALUE), 1, 1, 0) THEN
POS = EXTRACT(SYMBOLS (SYMBOL.VALUE), 1, 2, 0)
END ELSE
POS = SYMBOLS (NEXT.TKN.VALUE)
IF POS > SYMBOL.SIZE THEN
PRINT 'Too many tokens in sentence being parsed (LSYMBOL).'
EXP.EXIT:
END
SYMBOLS (SYMBOL.VALUE)<-1> = TOKEN:@VM:POS:@VM:SYMBOL.ORIGIN
SYMBOLS (NEXT.TKN.VALUE) = POS + 1
END
RETURN