X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=lexer.h;h=8adcdd9444d57360bf47f3be02d6497787715017;hb=14e576785476dd318701c177d97fd266f730eee2;hp=3d8cfdeef04a147e529a5322a6d74e90db7ea0a0;hpb=87686a3e9a834c551c74c5391b4859aa8fca8482;p=cparser diff --git a/lexer.h b/lexer.h index 3d8cfde..8adcdd9 100644 --- a/lexer.h +++ b/lexer.h @@ -1,12 +1,44 @@ +/* + * This file is part of cparser. + * Copyright (C) 2007-2008 Matthias Braun + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ #ifndef LEXER_H #define LEXER_H #include "symbol_table_t.h" #include "token_t.h" -void lexer_next_token(token_t *token); +extern token_t lexer_token; + +void lexer_next_token(void); /* for debugging */ -void lexer_next_preprocessing_token(token_t *token); +void lexer_next_preprocessing_token(void); + +void init_lexer(void); +void exit_lexer(void); + +void lexer_open_stream(FILE *stream, const char *input_name); +void lexer_open_buffer(const char *buffer, size_t len, const char *input_name); + +string_t concat_strings( const string_t *s1, const string_t *s2); +wide_string_t concat_string_wide_string(const string_t *s1, const wide_string_t *s2); +wide_string_t concat_wide_strings( const wide_string_t *s1, const wide_string_t *s2); +wide_string_t concat_wide_string_string(const wide_string_t *s1, const string_t *s2); #endif