//1// gravity_parser.h2// gravity3//4// Created by Marco Bambini on 01/09/14.5// Copyright (c) 2014 CreoLabs. All rights reserved.6//78#ifndef __GRAVITY_PARSER__9#define __GRAVITY_PARSER__1011#include "gravity_compiler.h"12#include "debug_macros.h"13#include "gravity_ast.h"1415/*16Parser is responsible to build the AST, convert strings and number from tokens and17implement syntax error recovery strategy.1819Notes about error recovery:20Each parse* function can return NULL in case of error but each function is RESPONSIBLE21to make appropriate actions in order to handle/recover errors.2223Error recovery techniques can be:24Shallow Error Recovery25Deep Error Recovery26https://javacc.java.net/doc/errorrecovery.html2728*/2930// opaque datatype31typedef struct gravity_parser_t gravity_parser_t;3233// public functions34gravity_parser_t *gravity_parser_create (const char *source, size_t len, uint32_t fileid, bool is_static);35gnode_t *gravity_parser_run (gravity_parser_t *parser, gravity_delegate_t *delegate);36void gravity_parser_free (gravity_parser_t *parser);3738#endif394041