diff options
author | Adrian Thurston <thurston@complang.org> | 2015-02-07 16:20:29 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-02-07 16:20:29 -0500 |
commit | ab2d8e8cdba3b5fe8b9d5e49ad22b4ef0c73461d (patch) | |
tree | f371ac845605d0bcd861465e3475cbc6fa20346a /src/pdarun.h | |
parent | 162a4df0969a2448d380e05e5c773b61eeae5207 (diff) | |
download | colm-ab2d8e8cdba3b5fe8b9d5e49ad22b4ef0c73461d.tar.gz |
code movement and conventions
Diffstat (limited to 'src/pdarun.h')
-rw-r--r-- | src/pdarun.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/pdarun.h b/src/pdarun.h index 5aa50839..33e5406d 100644 --- a/src/pdarun.h +++ b/src/pdarun.h @@ -364,7 +364,7 @@ typedef struct _PdaRun void colm_pda_init( struct colm_program *prg, PdaRun *pdaRun, PdaTables *tables, int parserId, long stopTarget, int revertOn, struct colm_struct *context ); -void clearPdaRun( struct colm_program *prg, struct colm_tree **sp, PdaRun *pdaRun ); +void colm_pda_clear( struct colm_program *prg, struct colm_tree **sp, PdaRun *pdaRun ); void rtCodeVectReplace( RtCodeVect *vect, long pos, const Code *val, long len ); void rtCodeVectEmpty( RtCodeVect *vect ); void rtCodeVectRemove( RtCodeVect *vect, long pos, long len ); @@ -409,8 +409,8 @@ inline static void appendWord( RtCodeVect *vect, Word word ) #endif } -void incrementSteps( PdaRun *pdaRun ); -void decrementSteps( PdaRun *pdaRun ); +void colm_increment_steps( PdaRun *pdaRun ); +void colm_decrement_steps( PdaRun *pdaRun ); void clearStreamImpl( struct colm_program *prg, Tree **sp, StreamImpl *inputStream ); void initSourceStream( StreamImpl *in ); @@ -419,9 +419,7 @@ void clearSourceStream( struct colm_program *prg, Tree **sp, StreamImpl *sourceS void clearContext( PdaRun *pdaRun, Tree **sp ); Kid *extractIgnore( PdaRun *pdaRun ); -long stackTopTarget( struct colm_program *prg, PdaRun *pdaRun ); void runCommit( PdaRun *pdaRun ); -int isParserStopFinished( PdaRun *pdaRun ); void pdaRunMatch( PdaRun *pdaRun, Kid *tree, Kid *pattern ); /* Offset can be used to look at the next nextRegionInd. */ @@ -435,11 +433,6 @@ int pdaRunGetNextPreRegion( PdaRun *pdaRun ); #define PcrPreEof 5 #define PcrReverse 6 -long parseToken( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, - FsmRun *fsmRun, StreamImpl *inputStream, long entry ); - -long undoParse( Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *inputStream, Tree *tree ); - Head *streamPull( struct colm_program *prg, struct colm_tree **sp, PdaRun *pdaRun, StreamImpl *is, long length ); Head *stringAllocPointer( struct colm_program *prg, const char *data, long length ); @@ -458,11 +451,17 @@ void executeGenerationAction( struct colm_program *prg, Tree **sp, FsmRun *fsmRu StreamImpl *inputStream, int frameId, Code *code, long id, Head *tokdata ); Kid *extractIgnore( PdaRun *pdaRun ); void clearIgnoreList( struct colm_program *prg, Tree **sp, Kid *kid ); -long parseLoop( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, +long colm_parse_loop( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, StreamImpl *inputStream, long entry ); Tree *getParsedRoot( PdaRun *pdaRun, int stop ); -void resetToken( PdaRun *pdaRun ); + +long colm_parse_frag( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, + Stream *input, long stopId, long entry ); +long colm_parse_finish( Tree **result, struct colm_program *prg, Tree **sp, + PdaRun *pdaRun, Stream *input , int revertOn, long entry ); +long colm_parse_undo_frag( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, + Stream *input, long steps, long entry ); #ifdef __cplusplus } |