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
21 lines
423 B
C
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
|