X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/blobdiff_plain/bb6b2dcdd9acffabfd373c4c3f6b64a9cc43f335..HEAD:/csrc/pfcompil.h diff --git a/csrc/pfcompil.h b/csrc/pfcompil.h index cdb7785..f95ca43 100644 --- a/csrc/pfcompil.h +++ b/csrc/pfcompil.h @@ -1,73 +1,77 @@ -/* @(#) pfcompil.h 96/12/18 1.11 */ - -#ifndef _pforth_compile_h -#define _pforth_compile_h - -/*************************************************************** -** Include file for PForth Compiler -** -** Author: Phil Burk -** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom -** -** The pForth software code is dedicated to the public domain, -** and any third party may reproduce, distribute and modify -** the pForth software code or any derivative works thereof -** without any compensation or license. The pForth software -** code is provided on an "as is" basis without any warranty -** of any kind, including, without limitation, the implied -** warranties of merchantability and fitness for a particular -** purpose and their equivalents under the laws of any jurisdiction. -** -***************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -Err ffPushInputStream( FileStream *InputFile ); -ExecToken NameToToken( const ForthString *NFA ); -FileStream * ffConvertSourceIDToStream( cell id ); -FileStream *ffPopInputStream( void ); -cell ffConvertStreamToSourceID( FileStream *Stream ); -cell ffFind( const ForthString *WordName, ExecToken *pXT ); -cell ffFindC( const char *WordName, ExecToken *pXT ); -cell ffFindNFA( const ForthString *WordName, const ForthString **NFAPtr ); -cell ffNumberQ( const char *FWord, cell *Num ); -cell ffRefill( void ); -cell ffTokenToName( ExecToken XT, const ForthString **NFAPtr ); -cell *NameToCode( ForthString *NFA ); -PForthDictionary pfBuildDictionary( int32 HeaderSize, int32 CodeSize ); -char *ffWord( char c ); -const ForthString *NameToPrevious( const ForthString *NFA ); -int32 FindSpecialCFAs( void ); -int32 FindSpecialXTs( void ); -int32 NotCompiled( const char *FunctionName ); -void CreateDicEntry( ExecToken XT, const ForthStringPtr FName, uint32 Flags ); -void CreateDicEntryC( ExecToken XT, const char *CName, uint32 Flags ); -void ff2Literal( cell dHi, cell dLo ); -void ffALiteral( cell Num ); -void ffColon( void ); -void ffCreate( void ); -void ffCreateSecondaryHeader( const ForthStringPtr FName); -void ffDefer( void ); -void ffFinishSecondary( void ); -void ffLiteral( cell Num ); -void ffStringCreate( ForthStringPtr FName); -void ffStringDefer( const ForthStringPtr FName, ExecToken DefaultXT ); -void pfHandleIncludeError( void ); - -ThrowCode ffSemiColon( void ); -ThrowCode ffOK( void ); -ThrowCode ffInterpret( void ); -ThrowCode ffOuterInterpreterLoop( void ); -ThrowCode ffIncludeFile( FileStream *InputFile ); - -#ifdef PF_SUPPORT_FP -void ffFPLiteral( PF_FLOAT fnum ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _pforth_compile_h */ +/* @(#) pfcompil.h 96/12/18 1.11 */ + +#ifndef _pforth_compile_h +#define _pforth_compile_h + +/*************************************************************** +** Include file for PForth Compiler +** +** Author: Phil Burk +** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom +** +** Permission to use, copy, modify, and/or distribute this +** software for any purpose with or without fee is hereby granted. +** +** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +** THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +** CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +** FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +** CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +** +***************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +Err ffPushInputStream( FileStream *InputFile ); +ExecToken NameToToken( const ForthString *NFA ); +FileStream * ffConvertSourceIDToStream( cell_t id ); +FileStream *ffPopInputStream( void ); +cell_t ffConvertStreamToSourceID( FileStream *Stream ); +cell_t ffFind( const ForthString *WordName, ExecToken *pXT ); +cell_t ffFindC( const char *WordName, ExecToken *pXT ); +cell_t ffFindNFA( const ForthString *WordName, const ForthString **NFAPtr ); +cell_t ffNumberQ( const char *FWord, cell_t *Num ); +cell_t ffRefill( void ); +cell_t ffTokenToName( ExecToken XT, const ForthString **NFAPtr ); +cell_t *NameToCode( ForthString *NFA ); +PForthDictionary pfBuildDictionary( cell_t HeaderSize, cell_t CodeSize ); +char *ffWord( char c ); +char *ffLWord( char c ); +const ForthString *NameToPrevious( const ForthString *NFA ); +cell_t FindSpecialCFAs( void ); +cell_t FindSpecialXTs( void ); +cell_t NotCompiled( const char *FunctionName ); +void CreateDicEntry( ExecToken XT, const ForthStringPtr FName, ucell_t Flags ); +void CreateDicEntryC( ExecToken XT, const char *CName, ucell_t Flags ); +void ff2Literal( cell_t dHi, cell_t dLo ); +void ffALiteral( cell_t Num ); +void ffColon( void ); +void ffCreate( void ); +void ffCreateSecondaryHeader( const ForthStringPtr FName); +void ffDefer( void ); +void ffFinishSecondary( void ); +void ffLiteral( cell_t Num ); +void ffStringCreate( ForthStringPtr FName); +void ffStringDefer( const ForthStringPtr FName, ExecToken DefaultXT ); +void pfHandleIncludeError( void ); + +ThrowCode ffSemiColon( void ); +ThrowCode ffOK( void ); +ThrowCode ffInterpret( void ); +ThrowCode ffOuterInterpreterLoop( void ); +ThrowCode ffIncludeFile( FileStream *InputFile ); + +#ifdef PF_SUPPORT_FP +void ffFPLiteral( PF_FLOAT fnum ); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _pforth_compile_h */