picoc/parse.c
zik.saleeba 32c5617d83 Fixed errors
git-svn-id: http://picoc.googlecode.com/svn/trunk@4 21eae674-98b7-11dd-bd71-f92a316d2d60
2008-10-14 04:51:34 +00:00

39 lines
695 B
C

#include <stdio.h>
#include "picoc.h"
/* the table of global definitions */
struct Table GlobalTable;
struct TableEntry GlobalHashTable[GLOBAL_TABLE_SIZE];
void ParseInit()
{
TableInit(&GlobalTable, &GlobalHashTable[0], "global", GLOBAL_TABLE_SIZE);
}
/* quick scan a source file for definitions */
void ParseScan(const Str *FileName, const Str *Source)
{
enum LexToken Token;
struct LexState Lexer;
LexInit(&Lexer, Source, FileName, 1);
while ( (Token = LexGetToken(&Lexer)) != TokenEOF)
{
/* do parsey things here */
printf("token %d\n", (int)Token);
}
}
void ParseCallFunction(const Str *FuncIdent, int argc, char **argv)
{
}