|
Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include "gw-config.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stdarg.h>#include <errno.h>#include <math.h>#include "gwlib/gwassert.h"#include "ws.h"#include "wserror.h"#include "wsutf8.h"#include "wsieee754.h"#include "wsbuffer.h"#include "wsencode.h"#include "wsalloc.h"#include "wsfalloc.h"#include "wsstream.h"#include "wshash.h"#include "wsbc.h"#include "wsstree.h"#include "wsasm.h"#include "wsopt.h"#include "wsstdlib.h"Go to the source code of this file.
Data Structures | |
| struct | WsContBreakRec |
| struct | WsCompilerRec |
Macros | |
| #define | WS_LINE_TERMINATOR "\n" |
| #define | WS_INT8_MIN -128 |
| #define | WS_INT8_MAX 127 |
| #define | WS_INT16_MIN -32768 |
| #define | WS_INT16_MAX 32767 |
| #define | WS_INT32_MIN -2147483648 |
| #define | WS_INT32_MAX 2147483647 |
| #define | WS_ERROR_B_MEMORY 0x01 |
| #define | WS_ERROR_B_SYNTAX 0x02 |
| #define | WS_ERROR_B_SEMANTIC 0x04 |
| #define | COMPILER_MAGIC (0xfefe0101) |
Typedefs | |
| typedef unsigned char | WsByte |
| typedef signed char | WsInt8 |
| typedef unsigned char | WsUInt8 |
| typedef signed short | WsInt16 |
| typedef unsigned short | WsUInt16 |
| typedef signed long | WsInt32 |
| typedef unsigned long | WsUInt32 |
| typedef double | WsFloat |
| typedef struct WsContBreakRec | WsContBreak |
| typedef struct WsCompilerRec | WsCompiler |
Enumerations | |
| enum | WsBool { WS_FALSE, WS_TRUE } |
Functions | |
| int | yylex () |
| WsBool | ws_lexer_register_block (WsCompiler *compiler, void *ptr) |
| WsBool | ws_lexer_register_utf8 (WsCompiler *compiler, WsUtf8String *string) |
| void | ws_lexer_free_block (WsCompiler *compiler, void *ptr) |
| void | ws_lexer_free_utf8 (WsCompiler *compiler, WsUtf8String *string) |
| int | ws_yy_parse (WsCompiler *compiler) |
| #define COMPILER_MAGIC (0xfefe0101) |
Definition at line 185 of file wsint.h.
Referenced by ws_create(), ws_error_memory(), ws_error_syntax(), ws_src_error(), ws_src_warning(), and ws_yy_lex().
| #define WS_ERROR_B_MEMORY 0x01 |
Definition at line 138 of file wsint.h.
Referenced by ws_error_memory(), and ws_error_syntax().
| #define WS_ERROR_B_SEMANTIC 0x04 |
Definition at line 146 of file wsint.h.
Referenced by ws_src_error().
| #define WS_ERROR_B_SYNTAX 0x02 |
Definition at line 141 of file wsint.h.
Referenced by ws_error_syntax().
| #define WS_INT16_MAX 32767 |
Definition at line 106 of file wsint.h.
Referenced by ws_bc_encode().
| #define WS_INT32_MAX 2147483647 |
Definition at line 109 of file wsint.h.
Referenced by buffer_to_int(), and ws_expr_linearize().
| #define WS_INT8_MAX 127 |
Definition at line 103 of file wsint.h.
Referenced by ws_bc_encode().
| #define WS_LINE_TERMINATOR "\n" |
Definition at line 97 of file wsint.h.
Referenced by ws_error_memory(), ws_error_syntax(), ws_info(), ws_src_error(), and ws_src_warning().
| typedef struct WsCompilerRec WsCompiler |
| typedef struct WsContBreakRec WsContBreak |
| enum WsBool |
| Enumerator | |
|---|---|
| WS_FALSE | |
| WS_TRUE | |
Definition at line 128 of file wsint.h.
| void ws_lexer_free_block | ( | WsCompiler * | compiler, |
| void * | ptr | ||
| ) |
Definition at line 281 of file ws.c.
References WsCompilerRec::lexer_active_list, WsCompilerRec::lexer_active_list_size, ws_fatal(), and ws_free().
Referenced by ws_expr_assign(), ws_expr_call(), ws_expr_postfix_var(), ws_expr_symbol(), ws_expr_unary_var(), ws_lexer_free_utf8(), ws_pragma_use(), and yyparse().
| void ws_lexer_free_utf8 | ( | WsCompiler * | compiler, |
| WsUtf8String * | string | ||
| ) |
Definition at line 305 of file ws.c.
References WsUtf8StringRec::data, and ws_lexer_free_block().
Referenced by ws_expr_const_string(), ws_pragma_meta_body_free(), ws_pragma_use(), and yyparse().
| WsBool ws_lexer_register_block | ( | WsCompiler * | compiler, |
| void * | ptr | ||
| ) |
Definition at line 248 of file ws.c.
References WsCompilerRec::lexer_active_list, WsCompilerRec::lexer_active_list_size, WS_FALSE, ws_realloc(), and WS_TRUE.
Referenced by ws_lexer_register_utf8(), and ws_yy_lex().
| WsBool ws_lexer_register_utf8 | ( | WsCompiler * | compiler, |
| WsUtf8String * | string | ||
| ) |
Definition at line 267 of file ws.c.
References WsUtf8StringRec::data, WsCompilerRec::lexer_active_list_size, WS_FALSE, ws_lexer_register_block(), and WS_TRUE.
Referenced by ws_yy_lex().
| int ws_yy_parse | ( | WsCompiler * | compiler | ) |
| int yylex | ( | ) |