Z / libzlang 0.29.0
C99 runtime library and the Zlang 0.29 source-to-source compiler
Loading...
Searching...
No Matches
parser.h File Reference

Parser API for the Zlang grammar. More...

#include "zlang/compiler/ast.h"
#include "zlang/compiler/diagnostics.h"
#include "zlang/compiler/lexer.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  zlang_parse_result_t
struct  zlang_parser_t

Typedefs

typedef struct zlang_parse_result_t zlang_parse_result_t
typedef struct zlang_parser_t zlang_parser_t

Functions

void zlang_parser_init (zlang_parser_t *parser, zlang_token_t *tokens, size_t token_capacity, zlang_ast_expression_t *expressions, size_t expression_capacity, zlang_ast_statement_t *statements, size_t statement_capacity, zlang_parameter_t *parameters, size_t parameter_capacity, zlang_comment_t *comments, size_t comment_capacity, zlang_diagnostics_t *diagnostics)
bool zlang_parse (zlang_parser_t *parser, const char *source, char *scratch, size_t scratch_capacity, zlang_parse_result_t *result)

Detailed Description

Parser API for the Zlang grammar.

Typedef Documentation

◆ zlang_parse_result_t

typedef struct zlang_parse_result_t zlang_parse_result_t

◆ zlang_parser_t

typedef struct zlang_parser_t zlang_parser_t

Function Documentation

◆ zlang_parse()

bool zlang_parse ( zlang_parser_t * parser,
const char * source,
char * scratch,
size_t scratch_capacity,
zlang_parse_result_t * result )

◆ zlang_parser_init()

void zlang_parser_init ( zlang_parser_t * parser,
zlang_token_t * tokens,
size_t token_capacity,
zlang_ast_expression_t * expressions,
size_t expression_capacity,
zlang_ast_statement_t * statements,
size_t statement_capacity,
zlang_parameter_t * parameters,
size_t parameter_capacity,
zlang_comment_t * comments,
size_t comment_capacity,
zlang_diagnostics_t * diagnostics )