Merge branch 'master' into build64
[debian/pforth] / csrc / pfcompil.h
1 /* @(#) pfcompil.h 96/12/18 1.11 */
2
3 #ifndef _pforth_compile_h
4 #define _pforth_compile_h
5
6 /***************************************************************
7 ** Include file for PForth Compiler
8 **
9 ** Author: Phil Burk
10 ** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom
11 **
12 ** The pForth software code is dedicated to the public domain,
13 ** and any third party may reproduce, distribute and modify
14 ** the pForth software code or any derivative works thereof
15 ** without any compensation or license.  The pForth software
16 ** code is provided on an "as is" basis without any warranty
17 ** of any kind, including, without limitation, the implied
18 ** warranties of merchantability and fitness for a particular
19 ** purpose and their equivalents under the laws of any jurisdiction.
20 **
21 ***************************************************************/
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 Err   ffPushInputStream( FileStream *InputFile );
28 ExecToken NameToToken( const ForthString *NFA );
29 FileStream * ffConvertSourceIDToStream( cell_t id );
30 FileStream *ffPopInputStream( void );
31 cell_t  ffConvertStreamToSourceID( FileStream *Stream );
32 cell_t  ffFind( const ForthString *WordName, ExecToken *pXT );
33 cell_t  ffFindC( const char *WordName, ExecToken *pXT );
34 cell_t  ffFindNFA( const ForthString *WordName, const ForthString **NFAPtr );
35 cell_t  ffNumberQ( const char *FWord, cell_t *Num );
36 cell_t  ffRefill( void );
37 cell_t  ffTokenToName( ExecToken XT, const ForthString **NFAPtr );
38 cell_t *NameToCode( ForthString *NFA );
39 PForthDictionary pfBuildDictionary( cell_t HeaderSize, cell_t CodeSize );
40 char *ffWord( char c );
41 char *ffLWord( char c );
42 const ForthString *NameToPrevious( const ForthString *NFA );
43 cell_t FindSpecialCFAs( void );
44 cell_t FindSpecialXTs( void );
45 cell_t NotCompiled( const char *FunctionName );
46 void  CreateDicEntry( ExecToken XT, const ForthStringPtr FName, ucell_t Flags );
47 void  CreateDicEntryC( ExecToken XT, const char *CName, ucell_t Flags );
48 void  ff2Literal( cell_t dHi, cell_t dLo );
49 void  ffALiteral( cell_t Num );
50 void  ffColon( void );
51 void  ffCreate( void );
52 void  ffCreateSecondaryHeader( const ForthStringPtr FName);
53 void  ffDefer( void );
54 void  ffFinishSecondary( void );
55 void  ffLiteral( cell_t Num );
56 void  ffStringCreate( ForthStringPtr FName);
57 void  ffStringDefer( const ForthStringPtr FName, ExecToken DefaultXT );
58 void  pfHandleIncludeError( void );
59
60 ThrowCode ffSemiColon( void );
61 ThrowCode ffOK( void );
62 ThrowCode ffInterpret( void );
63 ThrowCode ffOuterInterpreterLoop( void );
64 ThrowCode ffIncludeFile( FileStream *InputFile );
65
66 #ifdef PF_SUPPORT_FP
67 void ffFPLiteral( PF_FLOAT fnum );
68 #endif
69
70 #ifdef __cplusplus
71 }
72 #endif
73
74 #endif /* _pforth_compile_h */