X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=parser.h;h=6ccf6e40857a8f63930f2dd386aa4e215d9e7325;hb=c080804a9ae61e4ba0ec6fc7288c81c326fa9ddb;hp=4bc63fbbe6a4675f98261314658ebe9c14e8bba6;hpb=d376b308bd6906aaec5aef172629562664d442f3;p=cparser diff --git a/parser.h b/parser.h index 4bc63fb..6ccf6e4 100644 --- a/parser.h +++ b/parser.h @@ -1,6 +1,6 @@ /* * This file is part of cparser. - * Copyright (C) 2007-2008 Matthias Braun + * Copyright (C) 2007-2009 Matthias Braun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -21,15 +21,34 @@ #define PARSER_H #include "ast.h" +#include "entity_t.h" #include "type.h" typedef struct environment_entry_t environment_entry_t; +/** + * Initialize parser. Should be called once when the program starts + */ void init_parser(void); +/** + * Frees resources occupied by parser. Should be called once before the program + * exits. + */ void exit_parser(void); +/** + * Start parsing a new compilation unit + */ void start_parsing(void); + +/** + * Parse input. The source of the input is determined by the lexer module + */ void parse(void); + +/** + * Finish parsing a complete compilation unit and return the AST. + */ translation_unit_t *finish_parsing(void); type_t *revert_automatic_type_conversion(const expression_t *expression); @@ -37,4 +56,9 @@ entity_t *expression_is_variable(const expression_t *expression); void prepare_main_collect2(entity_t *entity); +entity_t *record_entity(entity_t *entity, bool is_definition); + +/** set default elf visbility */ +void set_default_visibility(elf_visibility_tag_t visibility); + #endif