summaryrefslogtreecommitdiff
path: root/misc/pascal/include/pedefs.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-05 13:56:40 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-05 13:56:40 +0000
commite28c2fe16466f245edd80d0f95ff9a5e16f1ca1d (patch)
tree5f89f71780880ab0b0e331ae7adc6d0aeecd57c7 /misc/pascal/include/pedefs.h
parent5a1b9567757d690d771fe673ef68b636377b2e4d (diff)
downloadnuttx-e28c2fe16466f245edd80d0f95ff9a5e16f1ca1d.tar.gz
nuttx-e28c2fe16466f245edd80d0f95ff9a5e16f1ca1d.tar.bz2
nuttx-e28c2fe16466f245edd80d0f95ff9a5e16f1ca1d.zip
Add header files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@492 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc/pascal/include/pedefs.h')
-rw-r--r--misc/pascal/include/pedefs.h270
1 files changed, 270 insertions, 0 deletions
diff --git a/misc/pascal/include/pedefs.h b/misc/pascal/include/pedefs.h
new file mode 100644
index 000000000..8f342bdd0
--- /dev/null
+++ b/misc/pascal/include/pedefs.h
@@ -0,0 +1,270 @@
+/***********************************************************************
+ * pedefs.h
+ * Definitions of error codes
+ *
+ * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ***********************************************************************/
+
+#ifndef __PEDEFS_H
+#define __PEDEFS_H
+
+/***********************************************************************
+ * COMPILATION TIME ERRORS
+ * eASSIGN Expected ':='
+ * eBEGIN Expected 'BEGIN'
+ * eCOLON Expected ':'
+ * eCOMMA Expected ','
+ * eCOUNT Error count exceeded (FATAL)
+ * eDO Expected 'DO'
+ * eDUPFILE Attempt to re-define file
+ * eDUPSYM Attempt to declare duplicate symbol
+ * eEND Expected 'END'
+ * eEQ Expected '='
+ * eEXPONENT Error in exponent of real constant
+ * eFILE Expected file identifier declared in PROGRAM
+ * eHUH Internal error (FATAL)
+ * eIDENT Expected identifier
+ * eIMPLEMENTATION Expected implementation section in unit file
+ * eINCLUDE Include file OPEN error (FATAL)
+ * eINTCONST Expected integer constant
+ * eINTERFACE Expected interface section in unit file
+ * eINTOVF Integer overflow (or underflow)
+ * eINTVAR Integer variable name expected
+ * eINVALIDFUNC Unrecognized built-in function
+ * eINVALIDPROC Unrecognized built-in procedure
+ * eINVARG Invalid procedure/function argument type
+ * eINVCONST Invalid constant in declaration
+ * eINVSIGNEDCONST Invalid constant after sign
+ * eINVFACTOR Invalid factor
+ * eINVFILE Invalid file identifier (as declared in PROGRAM)
+ * eINVLABEL Invalid label
+ * eINVPTR Invalid pointer type
+ * eINVTYPE Invalid type identifier
+ * eINVVARPARM Invalid/unsupported VAR parameter type
+ * eLBRACKET Expected '['
+ * eLPAREN Expected '('
+ * eMULTLABEL Attempt to multiply define label
+ * eNOSQUOTE EOL encounter in a string, probable missing "'"
+ * eNOTYET Not implemented yet
+ * eNPARMS Number of parameters in function or procedure
+ * call does not match number in declaration
+ * eOF Expected 'OF'
+ * eOVF Internal table overflow (FATAL)
+ * ePERIOD Expected '.'
+ * ePOFFCONFUSION Internal logic error in POFF file generation
+ * ePOFFWRITEERROR Error writing to POFF file
+ * ePROGRAM Expected 'PROGRAM'
+ * ePTRADR Expected pointer address (probably got value) form
+ * ePTRVAL Expected pointer value form, got value form
+ * eRBRACKET Expected ']'
+ * eRPAREN Expected ')'
+ * eRPARENorCOMMA Expected ')' or ','
+ * eSEEKFAIL Seek to file position failed
+ * eSEMICOLON Expected ';'
+ * eSTRING Expected a string
+ * eTHEN Expected 'THEN'
+ * eTOorDOWNTO Expected 'TO' or 'DOWNTO' in for statement
+ * eTRUNC String truncated
+ * eUNDECLABEL Attempt to define an undeclared label.
+ * eUNDEFILE Undefined file buffer
+ * eUNDEFLABEL A declared label was not defined.
+ * eUNDEFSYM Undefined symbol
+ * eUNTIL Expected 'UNTIL'
+ * eEXPRTYPE Illegal expression type for this operation
+ * eTERMTYPE Illegal term type for this operation
+ * eFACTORTYPE Illegal factor type for this operation
+ * eREADPARM Illegal parameter in READ statement
+ * eWRITEPARM Illegal parameter in WRITE statement
+ * eARRAYTYPE Illegal type for ARRAY OF
+ * ePOINTERTYPE Illegal pointer type
+ * eVARPARMTYPE Illegal VAR parameter type
+ * eSUBRANGE Expected ".."
+ * eSUBRANGETYPE Illegal subrange type
+ * eSET Expected valid/consistent type for SET OF
+ * sSETRANGE Value out of range for SET OF
+ * eSCALARTYPE Illegal scalar type
+ * eBADSHORTINT Short integer is out of range
+ * eSYMTABINTERNAL Internal error in symbol table
+ * eRECORDDECLARE Error in RECORD declaration
+ * eRECORDOBJECT Expected a field of RECORD
+ * eRECORDVAR Expected a RECORD variable in WITH
+ * eUNIT Expected UNIT at beginning of unit file
+ * eUNITNAME File does not contain the expected UNIT
+ * eARGIGNORED An argument was provided, but ignored
+ *
+ * LINK TIME ERRORS
+ * eUNDEFINEDSYMBOL A necessary symbol was not defined
+ * eMULTIDEFSYMBOL A symbol was defined multiple times
+ *
+ * ERRORS WHICH MAY OCCUR AT EITHER COMPILATION, LINK OR RUNTIME
+ * eNOMEMORY Memory allocation failed
+ * ePOFFREADERROR Error reading a POFF file
+ * ePOFFBADFORMAT The file format does not like valid POFF
+ * eRCVDSIGNAL Received SIGSEGV (or other) signal.
+ *
+ * RUN TIME ERRORS
+ * eBADPC Program Counter is out-of-range
+ * eBADSP Stack reference is out-of-range
+ * eSTRSTKOVERFLOW String stack overflow
+ * eILLEGALOPCODE Non-executable instruction found
+ * eEXIT oEND P-Code encountered
+ * eBADSYSIOFUNC Illegal SYSIO sub-function
+ * eBADSYSLIBCALL Illegal runtime library call
+ * eBADFPOPCODE Illegal FLOAT POINT op-code
+ * eFAILEDLIBCALL Runtime library call returned failure
+ * eINTEGEROVERFLOW Integer overflow
+ **********************************************************************/
+
+/* This is the error code that indicates that no error has occurred */
+
+#define eNOERROR ((uint16) 0x00)
+
+/* This is the maximum number of errors that will be reported before
+ * compilation is terminated.
+ */
+
+#define MAX_ERRORS 100
+
+/* COMPILATION TIME ERRORS */
+
+#define eASSIGN ((uint16) 0x01)
+#define eBEGIN ((uint16) 0x02)
+#define eCOLON ((uint16) 0x03)
+#define eCOMMA ((uint16) 0x04)
+#define eCOUNT ((uint16) 0x05)
+#define eDO ((uint16) 0x06)
+#define eDUPFILE ((uint16) 0x07)
+#define eDUPSYM ((uint16) 0x08)
+#define eEND ((uint16) 0x09)
+#define eEQ ((uint16) 0x0a)
+#define eEXPONENT ((uint16) 0x0b)
+#define eFILE ((uint16) 0x0c)
+#define eHUH ((uint16) 0x0d)
+#define eIDENT ((uint16) 0x0e)
+#define eIMPLEMENTATION ((uint16) 0x0f)
+
+#define eINCLUDE ((uint16) 0x10)
+#define eINTCONST ((uint16) 0x11)
+#define eINTERFACE ((uint16) 0x12)
+#define eINTOVF ((uint16) 0x13)
+#define eINTVAR ((uint16) 0x14)
+#define eINVALIDFUNC ((uint16) 0x15)
+#define eINVALIDPROC ((uint16) 0x16)
+#define eINVARG ((uint16) 0x17)
+#define eINVCONST ((uint16) 0x18)
+#define eINVSIGNEDCONST ((uint16) 0x19)
+#define eINVFACTOR ((uint16) 0x1a)
+#define eINVFILE ((uint16) 0x1b)
+#define eINVLABEL ((uint16) 0x1c)
+#define eINVPTR ((uint16) 0x1d)
+#define eINVTYPE ((uint16) 0x1e)
+#define eINVVARPARM ((uint16) 0x1f)
+
+#define eLBRACKET ((uint16) 0x20)
+#define eLPAREN ((uint16) 0x21)
+#define eMULTLABEL ((uint16) 0x22)
+#define eNOSQUOTE ((uint16) 0x23)
+#define eNOTYET ((uint16) 0x24)
+#define eNPARMS ((uint16) 0x25)
+#define eOF ((uint16) 0x26)
+#define eOVF ((uint16) 0x27)
+#define ePERIOD ((uint16) 0x28)
+#define ePOFFCONFUSION ((uint16) 0x29)
+#define ePOFFWRITEERROR ((uint16) 0x2a)
+#define ePROGRAM ((uint16) 0x2b)
+#define ePTRADR ((uint16) 0x2c)
+#define ePTRVAL ((uint16) 0x2d)
+#define eRBRACKET ((uint16) 0x2e)
+#define eRPAREN ((uint16) 0x2f)
+
+#define eRPARENorCOMMA ((uint16) 0x30)
+#define eSEEKFAIL ((uint16) 0x31)
+#define eSEMICOLON ((uint16) 0x32)
+#define eSTRING ((uint16) 0x33)
+#define eTHEN ((uint16) 0x34)
+#define eTOorDOWNTO ((uint16) 0x35)
+#define eTRUNC ((uint16) 0x36)
+#define eUNDECLABEL ((uint16) 0x37)
+#define eUNDEFILE ((uint16) 0x38)
+#define eUNDEFLABEL ((uint16) 0x39)
+#define eUNDEFSYM ((uint16) 0x3a)
+#define eUNTIL ((uint16) 0x3b)
+#define eEXPRTYPE ((uint16) 0x3c)
+#define eTERMTYPE ((uint16) 0x3d)
+#define eFACTORTYPE ((uint16) 0x3e)
+#define eREADPARM ((uint16) 0x3f)
+
+#define eWRITEPARM ((uint16) 0x40)
+#define eARRAYTYPE ((uint16) 0x41)
+#define ePOINTERTYPE ((uint16) 0x42)
+#define eVARPARMTYPE ((uint16) 0x43)
+#define eSUBRANGE ((uint16) 0x44)
+#define eSUBRANGETYPE ((uint16) 0x45)
+#define eSET ((uint16) 0x46)
+#define eSETRANGE ((uint16) 0x47)
+#define eSCALARTYPE ((uint16) 0x48)
+#define eBADSHORTINT ((uint16) 0x49)
+#define eSYMTABINTERNAL ((uint16) 0x4a)
+#define eRECORDDECLARE ((uint16) 0x4b)
+#define eRECORDOBJECT ((uint16) 0x4c)
+#define eRECORDVAR ((uint16) 0x4d)
+#define eUNIT ((uint16) 0x4e)
+#define eUNITNAME ((uint16) 0x4f)
+
+#define eARGIGNORED ((uint16) 0x50)
+
+/* LINK TIME ERRORS */
+
+#define eUNDEFINEDSYMBOL ((uint16) 0x60)
+#define eMULTIDEFSYMBOL ((uint16) 0x61)
+
+/* ERRORS WHICH MAY OCCUR AT EITHER COMPILATION OR RUNTIME */
+
+#define eNOMEMORY ((uint16) 0x70)
+#define ePOFFREADERROR ((uint16) 0x71)
+#define ePOFFBADFORMAT ((uint16) 0x72)
+#define eRCVDSIGNAL ((uint16) 0x73)
+
+/* RUN TIME ERRORS */
+
+#define eBADPC ((uint16) 0x80)
+#define eBADSP ((uint16) 0x81)
+#define eSTRSTKOVERFLOW ((uint16) 0x82)
+#define eILLEGALOPCODE ((uint16) 0x83)
+#define eEXIT ((uint16) 0x84)
+#define eBADSYSIOFUNC ((uint16) 0x85)
+#define eBADSYSLIBCALL ((uint16) 0x86)
+#define eBADFPOPCODE ((uint16) 0x87)
+#define eINTEGEROVERFLOW ((uint16) 0x89)
+#define eFAILEDLIBCALL ((uint16) 0x90)
+
+#endif /* __PEDEFS_H */