43795ab11a
(An improved version in conjunction with ktcc can generate executable files.) git-svn-id: svn://kolibrios.org@8733 a494cfbc-eb01-0410-851d-a64ba20cac60
49 lines
710 B
C
49 lines
710 B
C
/*
|
|
* 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
|