Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50325/error.beg
There are no other files named error.beg in the archive.
! File:   ERROR.BEG
!
!    This work was supported by the Advanced Research
!    Projects Agency of the Office of the Secretary of
!    Defense (F44620-73-C-0074) and is monitored by the
!    Air Force Office of Scientific Research.

!
!
!
!	DECLARATIONS NEEDED BY MODULES THAT PARTICIPATE IN ERROR HANDLING.
!
!
!-----------------------------------------------------------------------
!15. HERE ARE "EXTERNAL" DECLARATIONS OF VARIOUS ROUTINES AND
!   GLOBAL COUNTERS AND FLAGS ASSOCIATED WITH ERROR HANDLING.


EXTERNAL
	ERRORR,		! FROM SYNTAX; FATAL SYNTAX ERROR HANDLER (CALLS ERRPRNT)
	WARNEM,		! FROM DRIVER; NON-FATAL ERROR HANDLER
	ERRPRNT,	! FROM DRIVER; FATAL ERROR HANDLER

%   THE FOLLOWING "LOCATION" POINTERS REFER TO THE POSITION OF SOME
    PIECE OF SOURCE TEXT, AND ARE IN THE FORMAT:
	(LINE NUMBER) ^ 22 + (CHARACTER POSITION WITHIN LINE)
%
	LCBRAC,		! LOCATION OF LAST "GOOD" CLOSING BRACKET
	LOBRAC,		! LOCATION OF "CURRENT" OPEN BRACKET
	NCBUFF,		! LOCATION OF LAST CHARACTER SCANNED
!	NATOM,		! (USED IN LEXAN TO FILL NSYM, NDEL)
	NDEL,		! LOCATION OF LAST DELIMITER SCANNED
	NSYM,		! LOCATION OF LAST NON-DELIMITER SCANNED
	SCANCHANGE,	! VALUE OF NATOM WHEN SCANTYPE LAST CHANGED
			! (START OF STRING, COMMENT, OR MACRO DEFINITION)
%%
	ERRINFO,	! TWO WORDS OF EXTRA INFORMATION WHICH MAY
			! OPTIONALLY BE FILLED DURING A CALL ON ERROR,
			! ERRPRNT, OR WARNEM (AND USED BY ERROUT).
	ERRLEVEL,	! TRUE IF "PANIC SCAN" IS BEING DONE AND ERRORS
			! ARE TO BE IGNORED.
	ERRORFOUND,	! COUNT OF FATAL ERRORS FOUND
	WARNINGFOUND,	! COUNT OF NON-FATAL ERRORS FOUND
	LASTLINE,	! NUMBER OF LAST SOURCE LINE
	MANYACTS;	! CURRENT STRUCTURE ACCESS MAY HAVE
			! INDEFINITELY MANY ACTUAL PARAMETERS.

!-----------------------------------------------------------------------
!16. THE FOLLOWING ARE THE NUMBERS ASSOCIATED WITH THE POSSIBLE
!   ERRORS WHICH MAY OCCUR IN BLISS DURING A COMPILATION.


    BIND
	IDERR=0,	! UNDECLARED IDENTIFIER
	DCLERR=1,	! DECLARATION AWAY FROM BLOCK HEAD
	EXPRERR=2,	! EXPRESSION IN WRONG CONTEXT
	BRACERR=3,	! END APPEARS MATCHING ( OR
			! ) APPEARS MATCHING BEGIN
	OPERR1=4,	! UNARY (BINARY) OPERATOR IN WRONG CONTEXT
	OPERR2=5,	! CONTROL EXPRESSION MUST BE PARENTHESIZED
	OPERR3=6,	! MISSING OR EXTRA OPERAND
	OPERR4=7,	! MISSING OPERAND
	IFERR=8,	! IF APPEARS WITHOUT THEN
	WUERR=9,	! WHILE (UNTIL) WITHOUT DO
	DOERR=10,	! DO WITHOUT WHILE (UNTIL)
!	REPERR1=11,	! IMPROPERLY DEFINED CONTROL VARIABLE
	REPERR2=12,	! DO MISSING IN INCR (DECR) STATEMENT
	PARAERR=13,	! PARAMETER LIST NOT CLOSED PROPERLY
	CASERR1=14,	! MISSING OF IN CASE
	CASERR2=15,	! CASE WITHOUT SET
	CASERR3=16,	! SET WITHOUT TES
	SELERR1=17,	! MISSING OF IN SELECT
	SELERR2=18,	! SELECT WITHOUT NSET
	SELERR3=19,	! COLON MISSING IN SELECT
	SELERR4=20,	! MISSING TESN
	WALOCERR=21,	! ADDRESS ARITHMETIC ON LOCAL
	ERILLPTR=22,	! ILLEGAL OCCURRENCE OF POINTER EXPRESSION
	PERR1=23,	! INVALID POSITION EXPRESSION IN POINTER
	PERR2=24,	! INVALID SIZE EXPRESSION IN POINTER
	WAPSOVFL=25,	! POINTER EXPRESSION TRIES TO ACCESS FIELD WHICH CROSSES A WORD BOUNDARY
	WAPOSOVFL=26,	! POSITION SPECIFIED IS GREATER THAN 16
	INERR1=27,	! BAD SYNTAX FOR INLINE
	INERR2=28,	! PARAMETER TO INLINE MUST BE LITERAL OR LONG STRING
	INERR3=29,	! USE OF INLINE (WARNING)
	ENERR1=30,	! COLON MISSING IN ENABLE
	ENERR2=31,	! MISSING ELBANE
	ENERR0=32,	! MORE THAN ONE ENABLE FOR THIS BLOCK
	CREATERR1=33,	! INVALID 1ST ARGUMENT TO CREATE.
	CREATERR2=34,	! AT MISSING IN CREATE.
	CREATERR3=35,	! LENGTH MISSING IN CREATE.
	CREATERR4=36,	! THEN MISSING IN CREATE.
	WABLKMTCH=37,	! BLOCK BEGIN & END NAMES DO NOT MATCH
	WATMPARMS=38,	! TOO MANY PARAMETERS PASSED TO SPEC. FUN. OR ROUTINE CALL
	BADSYMERR=39,	! NON-ADDRESSABLE SYMBOL USED AS EXPRESSION

	EXITERR0=40,	! LABEL NOT USED ON THIS EXPRESSION.
	NOFOUNDEXERR=41,! LABEL NOT YET ENCOUNTERED ON EXPRESSION.
	LABELERR=42,	! OBJECT OF LEAVE EXPRESSION
			! IS NOT LABEL.
	LABUSERR=43,	! ANOTHER EXPRESSION GIVEN SAME LABEL
	EXITERR1=44,	! RETURN (EXITLOOP) OUTSIDE ROUTINE (LOOP)
	WILLNSARG=45,	! ARGUMENT TO $NAME OR $STRING NOT LITERAL OR STRING.

	WACANTRES=46,	! REGISTER NOT AVAILABLE FOR RESERVATION
	ERMISSBRC=47,	! TOO MANY CLOSE BRACKETS OR MISSING OPEN BRACKET
	WABADMOD=48,	! ERROR IN MODULE HEAD; SCAN RESTARTED AT
			!    "BEGIN" POINTED TO BY ERROR POINTER
	WASWNONX=49,	! INVALID SWITCH SPECIFIED
	WASMPREV=50,	! SYMBOL PREVIOUSLY DECLARED AT CURRENT BLOCKLEVEL
	WASWSYN=51,	! SYNTAX ERROR IN SWITCH SPECIFICATION
	ERMBADEXP=52,	! LITERAL EXPECTED IN THIS CONTEXT.
	WAINVSTRUC=53,	! STRUCTURE NAME NOT A NAME
	WASMNOTSTR=54,	! STRUCTURE NAME NOT A STRUCTURE, OR UNDECLARED
			! DEFINED AS ONE.
	ERSYMEQ=55,	! MISSING EQUAL SIGN
	DCLDELERR=56,	! DECLARATOR DELIMITER ERROR. MUST BE A COMMA
			! OR SEMICOLON.
	ERSYMNPRD=57,	! IN A FORWARD DECLARATION, THERE
			! MUST BE ONLY A SINGLE LITERAL EXPRESSION IN
			! PARENTHESIS.
	DECLSYMERR=58,	! ILLEGAL SYMBOL BEFORE DECLARATOR NAME
	ERSMNDEC=59,	! REGISTER NOT AVAILABLE
	ERSYMBRAC=60,	! NO "]" AFTER SIZE FIELD
	ERSYMGRLD=61,	! NO SEMICOLON AFTER DECLARATION
			! EXPRESSION.
	ERSYINVMDEC=62,	! MODULE DECLARATION FOUND WITHIN
			! MODULE BODY.
	LSIZERR=63,	! LABEL DECLARATIONS MAY NOT HAVE A SIZE FIELD.
	WANOEQL=64,	! "=" NOT ALLOWED IN DECLARATION
	ERREQRDEC=65,	! NO "=" IN ROUTINE DECL.
	NOOPERATOR=66,	! ATOMIC OPERANDS NOT SEPARATED BY DELIMITER
	ERRBYTEFOL=67,	! NO DECLARATION FOLLOWING 'BYTE'
	ERDCLRESWD=68,	! TRIED TO DECLARE RESERVED WORD.
	ERSNMBDOT=69,	! STRUCTURE NAME MUST BE DOTTED IN ITS BODY
	ERNODOTS=70,	! MUST NOT DOT A FORMAL IN SIZE EXPRESSION
	ERSMSQBCLOSE=71, ! MISSING PARAM LIST CLOSING BRACKET
	ERSYMFOL=72,	! SYMBOL OR LITERAL MUST NOT FOLLOW A
			! CLOSING BRACKET (SEE RUNDE).
	ERMEQ=73,	! EQUAL SIGN MISSING IN STRUCT OR MACRO
	ERMPL=74,	! MISSING ACTUAL PARAMETER LIST
	ERMFPL=75,	! MISSING ACTUAL PARAMETER
	ERXACTS=76,	! EXTRA ACTUAL PARAMETERS TO A STRUCTURE
	WAMSPLNKG=77,	! MISSPELLED LINKAGE NAME
	WACANTMAP=78,	! SYMBOL NOT SUITED FOR "MAP" DECLARATION
	ERMAPLD=79,	! MISSING ACTUAL PARAMETER LIST DELIMITER
	ERSYIQC=80,	! INVALID ESCAPE CHARACTER
	ERSYMRQ=81,	! MISSING RIGHT QUOTE
	ERSYPLMRP=82,	! MISSING RIGHT PAREN IN A PLIT
	ERSMPLNLI=83,	! DUPLICATION FACTOR NOT LITERAL
	ERSMPLNLO=84,	! NOT LITERAL AT LOAD TIME
	ERILSUSE=85,	! LONG STRING MAY NOT BE USED HERE
	ERMRD=86,	! MISSING ROUTINE DEF. DECLARED FORWARD
	ERISEDS=87,	! INITIAL VALUE SIZE EXCEDES DECLARED SIZE
	ERNEEDLS=88,	! STRING FUNCTION REQUIRES STRING ARGUMENT
	WBADCSECT=89,	! CSECT DECLARATION ERROR - IGNORED
	LNKGNOEQUAL=90,	! MISSING EQUAL IN LINKAGE DECLARATION
	LNKGNOTYP=91,	! NO LINKAGE TYPE SPECIFIED
	LNKGTOOMANYP=92,! TOO MANY PARAMETERS IN LINKAGE DECLARATION
	LNKGINVSYNTAX=93,! MISSING COMMA IN LINKAGE DECLARATION
	LNKGINVPARM=94,	! INVALID PARAMETER TYPE
	LNKGNOTREG=95,	! INVALID REGISTER NUMBER
	WATRAPLNKG=96,	! CANNOT MAP "TRAP" LINKAGE TYPE
	WABADRAD50=97,	! ILLEGAL CHARACTER IN RADIX 50 STRING

	NOTENUFREGS=98,	! REGISTER ALLOCATION FAILURE (ARLST)
	REGTOOCROWD=99,	! REGISTER ALLOCATION FAILURE (SRLST)
	DIVERR=100,	! ATTEMPT TO DIVIDE BY ZERO
	ERNOSYM=101,	! MISSING SYMBOL IN DECLARATION
	WASTATERR=102,	! I/O ERROR DURING COMPILER STATISTICS WRITEOUT
	ERUPLVL=103,	! ILLEGAL UP-LEVEL ADDRESSING
	WAMODDOM=104,	! EXTRA OR MISSING "ELUDOM"
	NOTIMPL=105,	! NOT IMPLEMENTED
	ERREQNEST=106,	! REQUIRE FILES NESTED TOO DEEP
	ERREQDEV=107,	! REQUIRE DEVICE NOT AVAILABLE
	ERREQDPPN=108,	! INVALID DEC-PPN FORMAT FOR REQUIRE
	ERREQCPPN=109,	! INVALID CMU-PPN FOR REQUIRE
	ERREQFIND=110,	! REQUIRE FILE NOT FOUND
	ERUNTCOM=111,	! UNTERMINATED COMMENT
	ERUNTMAC=112,	! UNTERMINATED MACRO DEFINITION
	ERMSEND=113,	! MISSING END OR RIGHT PAREN
	ERINVBNSYN=114,	! INVALID BLOCK NAME SYNTAX
	ERINVBNARG=115,	! INVALID BLOCK NAME
	WASTRUCTREC=116,! STRUCTURE MAY NOT CALL ITSELF RECURSIVELY

	ERSYMOR=#675,	! SYMBOL TYPE NOT ADDRESSABLE (DELAY)
	ERINVMODE=#676,	! MODE OF NODE INVALID IN DELAY (ADDCLASS)
	ERINVLEXT=#677;	! LEXEME TYPE INVALID IN DELAY (ADDCLASS)


!---------------------------------------------------------------------
!17. THE FOLLOWING ARE: A FLAG TO INFORM "RUNC" OF THE PROPER REACTION
!   TO CERTAIN OPEN BRACKETS, AND MACROS (CALLED IN "DCLARE" AND
!   "EXPRESSION") TO SET AND RESTORE THAT FLAG.

EXTERNAL INDECL;

MACRO	INDCL = INDECL_.INDECL^1 + 1 $,
	INEXP = INDECL_.INDECL^1 + 0 $,
	RESINDECL = INDECL_.INDECL^(-1) $;

!---------------------------------------------------------------------
!18. HERE IS THE "PANIC STOP" EQUIPMENT: NAMES FOR THE INDICES INTO THE
!   PANICSTOP TABLE IN "ERRORR", AND MACROS FOR SETTING AND RESTORING
!   "LASTEND", WHICH IS THE "CURRENT" INDEX.

BIND	PSPARSEM	= 1,
	PSENDSEM	= 2,
	PSOF		= 3,
	PSTES		= 4,
	PSTESSEM	= 5,
	PSTESN		= 6,
	PSTESNCOLSEM	= 7,
	PSELBCOLSEM	= 8,
	PSCOMSEM	= 9,
	PSCOMSQBC	= 10,
	PSPARCOM	= 11,
	PSPAR		= 12,
	PSDO		= 13,
	PSWU		= 14,
	PSTHEN		= 15,
	PSAT		= 16,
	PSLENGTH	= 17,
	PSSEM		= 18,
	PSPOI		= 19,
	PSEND		= 20;

EXTERNAL LASTEND;

MACRO	NEWLASTEND(N) = SAVEL_.LASTEND; LASTEND_N $,
	RESLASTEND = LASTEND_.SAVEL $;