tinyvm/include/tvm/tvm_lexer.h
Joseph Kogut ca87b3c5e9 Refactor with a consistent coding style
This commit refactors the project using a single, consistent coding
style, derived from the Linux Kernel Coding Style, available here:

https://www.kernel.org/doc/Documentation/CodingStyle

This includes, but is not limited to:
* Removal of typedefs, especially for structs
* Limiting lines to a reasonable length, 80 characters, mostly
* K&R style braces
* Removal of CamelCase
2016-08-28 20:31:12 -07:00

21 lines
423 B
C

#ifndef TVM_LEXER_H_
#define TVM_LEXER_H_
#define MAX_ARGS 2
#define MAX_TOKENS 4
#include "tvm_htab.h"
struct tvm_lexer_ctx {
char **source_lines;
char ***tokens;
};
struct tvm_lexer_ctx *lexer_create();
void tvm_lexer_destroy(struct tvm_lexer_ctx *l);
/* Tokenize the character array "source" into lines and tokens */
void tvm_lex(struct tvm_lexer_ctx *lexer,
char *source, struct tvm_htab_ctx *defines);
#endif