forked from KolibriOS/kolibrios
Added new port TinyBasic
(An improved version in conjunction with ktcc can generate executable files.) git-svn-id: svn://kolibrios.org@8733 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
48
programs/develop/tinybasic-1.0.4/inc/tokeniser.h
Normal file
48
programs/develop/tinybasic-1.0.4/inc/tokeniser.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Tiny BASIC
|
||||
* Tokenisation Header
|
||||
*
|
||||
* Copyright (C) Damian Walker 2019
|
||||
* Created: 04-Aug-2019
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __TOKENISER_H__
|
||||
#define __TOKENISER_H__
|
||||
|
||||
|
||||
/* pre-requisite headers */
|
||||
#include "token.h"
|
||||
|
||||
|
||||
/*
|
||||
* Structure Defnitions
|
||||
*/
|
||||
|
||||
|
||||
/* Token stream */
|
||||
typedef struct token_stream TokenStream;
|
||||
typedef struct token_stream {
|
||||
void *data; /* private data */
|
||||
Token *(*next) (TokenStream *);
|
||||
int (*get_line) (TokenStream *);
|
||||
void (*destroy) (TokenStream *);
|
||||
} TokenStream;
|
||||
|
||||
|
||||
/*
|
||||
* Constructor Declarations
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Constructor for TokenStream
|
||||
* params:
|
||||
* FILE* input Input file
|
||||
* returns:
|
||||
* TokenStream* The new token stream
|
||||
*/
|
||||
TokenStream *new_TokenStream (FILE *input);
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user