Piparser

Provides lexer and parser. More...

Enumerations

enum  {
  TOK_NONE, TOK_OPEN, TOK_CLOSE, TOK_DOT,
  TOK_QUOTE, TOK_SYM, TOK_NUM, TOK_STR
}
 

Functions

cellread_sexpr (FILE *f)
 
cellread_sexpr_tok (FILE *f, int tok)
 
char * get_token_text ()
 
int next_token (FILE *f)
 reads and returns the identifier of the next token in f More...
 

Detailed Description

Provides lexer and parser.

Enumeration Type Documentation

anonymous enum
Enumerator
TOK_NONE 

empty file token

TOK_OPEN 

open par token

TOK_CLOSE 

closed par token

TOK_DOT 

dot token

TOK_QUOTE 

quote token

TOK_SYM 

symbol token

TOK_NUM 

number token

TOK_STR 

string token

Function Documentation

char* get_token_text ( )
int next_token ( FILE *  f)

reads and returns the identifier of the next token in f

Parameters
fthe input source
Returns
int the code of the token
cell* read_sexpr ( FILE *  f)
cell* read_sexpr_tok ( FILE *  f,
int  tok 
)