#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <qregexp.h>
#include "defargs.h"
#include "entry.h"
#include "util.h"
#include "arguments.h"
#include "message.h"
Go to the source code of this file.
Classes | |
struct | yy_buffer_state |
struct | yy_trans_info |
Typedefs | |
typedef signed char | flex_int8_t |
typedef short int | flex_int16_t |
typedef int | flex_int32_t |
typedef unsigned char | flex_uint8_t |
typedef unsigned short int | flex_uint16_t |
typedef unsigned int | flex_uint32_t |
typedef struct yy_buffer_state * | YY_BUFFER_STATE |
typedef size_t | yy_size_t |
typedef unsigned char | YY_CHAR |
typedef int | yy_state_type |
This scanner is used to convert a string into a list of function or template arguments. Each parsed argument results in a Argument struct, that is put into an ArgumentList in declaration order. Comment blocks for arguments can also be included in the string. The argument string does not contain new-lines (except inside any comment blocks). An Argument consists of the string fields: type,name,default value, and documentation The Argument list as a whole can be pure, constant or volatile.
Examples of input strings are:
Note: It is not always possible to distinguish between the name and type of an argument. In case of doubt the name is added to the type, and the matchArgumentList in util.cpp is be used to further determine the correct separation.
Definition in file defargs.cpp.
#define BEGIN (yy_start) = 1 + 2 * |
Definition at line 144 of file defargs.cpp.
#define CopyArgCurly 7 |
Definition at line 958 of file defargs.cpp.
#define CopyArgRound 4 |
Definition at line 955 of file defargs.cpp.
#define CopyArgRound2 5 |
Definition at line 956 of file defargs.cpp.
#define CopyArgSharp 6 |
Definition at line 957 of file defargs.cpp.
#define CopyArgString 2 |
Definition at line 953 of file defargs.cpp.
#define CopyRawString 3 |
Definition at line 954 of file defargs.cpp.
#define defargsYYwrap | ( | n | ) | 1 |
Definition at line 354 of file defargs.cpp.
#define ECHO do { if (fwrite( defargsYYtext, defargsYYleng, 1, defargsYYout )) {} } while (0) |
Definition at line 1053 of file defargs.cpp.
#define EOB_ACT_CONTINUE_SCAN 0 |
Definition at line 179 of file defargs.cpp.
#define EOB_ACT_END_OF_FILE 1 |
Definition at line 180 of file defargs.cpp.
#define EOB_ACT_LAST_MATCH 2 |
Definition at line 181 of file defargs.cpp.
#define FLEX_BETA |
Definition at line 33 of file defargs.cpp.
#define FLEX_SCANNER |
Definition at line 28 of file defargs.cpp.
#define FLEXINT_H |
Definition at line 49 of file defargs.cpp.
#define FuncQual 11 |
Definition at line 962 of file defargs.cpp.
#define INITIAL 0 |
Definition at line 951 of file defargs.cpp.
#define INT16_MAX (32767) |
Definition at line 92 of file defargs.cpp.
#define INT16_MIN (-32767-1) |
Definition at line 83 of file defargs.cpp.
#define INT32_MAX (2147483647) |
Definition at line 95 of file defargs.cpp.
#define INT32_MIN (-2147483647-1) |
Definition at line 86 of file defargs.cpp.
#define INT8_MAX (127) |
Definition at line 89 of file defargs.cpp.
#define INT8_MIN (-128) |
Definition at line 80 of file defargs.cpp.
#define ReadDocBlock 12 |
Definition at line 963 of file defargs.cpp.
#define ReadDocLine 13 |
Definition at line 964 of file defargs.cpp.
#define ReadFuncArgDef 9 |
Definition at line 960 of file defargs.cpp.
#define ReadFuncArgPtr 10 |
Definition at line 961 of file defargs.cpp.
#define ReadFuncArgType 8 |
Definition at line 959 of file defargs.cpp.
#define ReadTypeConstraint 14 |
Definition at line 965 of file defargs.cpp.
#define REJECT |
Definition at line 818 of file defargs.cpp.
#define Start 1 |
Definition at line 952 of file defargs.cpp.
#define TrailingReturn 15 |
Definition at line 966 of file defargs.cpp.
#define UINT16_MAX (65535U) |
Definition at line 101 of file defargs.cpp.
#define UINT32_MAX (4294967295U) |
Definition at line 104 of file defargs.cpp.
#define UINT8_MAX (255U) |
Definition at line 98 of file defargs.cpp.
#define unput | ( | c | ) | yyunput( c, (yytext_ptr) ) |
Definition at line 199 of file defargs.cpp.
#define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
Definition at line 350 of file defargs.cpp.
#define YY_BREAK break; |
Definition at line 1132 of file defargs.cpp.
#define YY_BUF_SIZE 16384 |
Definition at line 163 of file defargs.cpp.
#define YY_BUFFER_EOF_PENDING 2 |
Definition at line 266 of file defargs.cpp.
#define YY_BUFFER_NEW 0 |
Definition at line 254 of file defargs.cpp.
#define YY_BUFFER_NORMAL 1 |
Definition at line 255 of file defargs.cpp.
#define yy_create_buffer defargsYY_create_buffer |
Definition at line 9 of file defargs.cpp.
#define YY_CURRENT_BUFFER |
Definition at line 282 of file defargs.cpp.
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
Definition at line 289 of file defargs.cpp.
#define YY_DECL int defargsYYlex (void) |
Definition at line 1120 of file defargs.cpp.
#define YY_DECL_IS_OURS 1 |
Definition at line 1116 of file defargs.cpp.
#define yy_delete_buffer defargsYY_delete_buffer |
Definition at line 10 of file defargs.cpp.
#define YY_DO_BEFORE_ACTION |
Definition at line 378 of file defargs.cpp.
#define YY_END_OF_BUFFER 61 |
Definition at line 386 of file defargs.cpp.
#define YY_END_OF_BUFFER_CHAR 0 |
Definition at line 159 of file defargs.cpp.
#define YY_EXIT_FAILURE 2 |
Definition at line 2696 of file defargs.cpp.
#define YY_EXTRA_TYPE void * |
Definition at line 977 of file defargs.cpp.
#define YY_FATAL_ERROR | ( | msg | ) | yy_fatal_error( msg ) |
Definition at line 1107 of file defargs.cpp.
#define yy_flex_debug defargsYY_flex_debug |
Definition at line 11 of file defargs.cpp.
#define YY_FLEX_MAJOR_VERSION 2 |
Definition at line 29 of file defargs.cpp.
#define YY_FLEX_MINOR_VERSION 5 |
Definition at line 30 of file defargs.cpp.
#define YY_FLEX_SUBMINOR_VERSION 35 |
Definition at line 31 of file defargs.cpp.
#define yy_flush_buffer defargsYY_flush_buffer |
Definition at line 13 of file defargs.cpp.
#define YY_FLUSH_BUFFER defargsYY_flush_buffer(YY_CURRENT_BUFFER ) |
Definition at line 318 of file defargs.cpp.
#define yy_init_buffer defargsYY_init_buffer |
Definition at line 12 of file defargs.cpp.
Definition at line 921 of file defargs.cpp.
#define YY_INT_ALIGNED short int |
Definition at line 5 of file defargs.cpp.
#define YY_LESS_LINENO | ( | n | ) |
Definition at line 183 of file defargs.cpp.
#define yy_load_buffer_state defargsYY_load_buffer_state |
Definition at line 14 of file defargs.cpp.
#define YY_MORE_ADJ 0 |
Definition at line 830 of file defargs.cpp.
#define yy_new_buffer defargsYY_create_buffer |
Definition at line 328 of file defargs.cpp.
#define YY_NEW_FILE defargsYYrestart(defargsYYin ) |
Definition at line 157 of file defargs.cpp.
#define YY_NO_INPUT 1 |
Definition at line 891 of file defargs.cpp.
#define YY_NO_UNISTD_H 1 |
Definition at line 892 of file defargs.cpp.
#define YY_NULL 0 |
Definition at line 131 of file defargs.cpp.
#define YY_NUM_RULES 60 |
Definition at line 385 of file defargs.cpp.
#define YY_READ_BUF_SIZE 8192 |
Definition at line 1045 of file defargs.cpp.
#define YY_RESTORE_YY_MORE_OFFSET |
Definition at line 831 of file defargs.cpp.
#define YY_RULE_SETUP YY_USER_ACTION |
Definition at line 1135 of file defargs.cpp.
#define YY_SC_TO_UI | ( | c | ) | ((unsigned int) (unsigned char) c) |
Definition at line 138 of file defargs.cpp.
#define yy_set_bol | ( | at_bol | ) |
Definition at line 340 of file defargs.cpp.
#define yy_set_interactive | ( | is_interactive | ) |
Definition at line 330 of file defargs.cpp.
#define YY_SKIP_YYWRAP |
Definition at line 355 of file defargs.cpp.
#define YY_START (((yy_start) - 1) / 2) |
Definition at line 150 of file defargs.cpp.
#define YY_START_STACK_INCR 25 |
Definition at line 1102 of file defargs.cpp.
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
Definition at line 168 of file defargs.cpp.
#define YY_STATE_EOF | ( | state | ) | (YY_END_OF_BUFFER + state + 1) |
Definition at line 154 of file defargs.cpp.
#define YY_STRUCT_YY_BUFFER_STATE |
Definition at line 207 of file defargs.cpp.
#define yy_switch_to_buffer defargsYY_switch_to_buffer |
Definition at line 15 of file defargs.cpp.
#define YY_TRAILING_HEAD_MASK 0x4000 |
Definition at line 817 of file defargs.cpp.
#define YY_TRAILING_MASK 0x2000 |
Definition at line 816 of file defargs.cpp.
#define YY_TYPEDEF_YY_BUFFER_STATE |
Definition at line 171 of file defargs.cpp.
#define YY_TYPEDEF_YY_SIZE_T |
Definition at line 202 of file defargs.cpp.
#define YY_USER_ACTION |
Definition at line 1127 of file defargs.cpp.
#define yyalloc defargsYYalloc |
Definition at line 24 of file defargs.cpp.
#define yyconst |
Definition at line 127 of file defargs.cpp.
#define yyfree defargsYYfree |
Definition at line 26 of file defargs.cpp.
#define yyin defargsYYin |
Definition at line 16 of file defargs.cpp.
#define yyleng defargsYYleng |
Definition at line 17 of file defargs.cpp.
#define yyless | ( | n | ) |
Definition at line 2708 of file defargs.cpp.
#define yyless | ( | n | ) |
Definition at line 2708 of file defargs.cpp.
#define yylex defargsYYlex |
Definition at line 18 of file defargs.cpp.
#define yylineno defargsYYlineno |
Definition at line 19 of file defargs.cpp.
#define yymore | ( | ) | yymore_used_but_not_detected |
Definition at line 829 of file defargs.cpp.
#define yyout defargsYYout |
Definition at line 20 of file defargs.cpp.
#define yyrealloc defargsYYrealloc |
Definition at line 25 of file defargs.cpp.
#define yyrestart defargsYYrestart |
Definition at line 21 of file defargs.cpp.
#define YYSTATE YY_START |
Definition at line 151 of file defargs.cpp.
#define YYTABLES_NAME "yytables" |
Definition at line 2906 of file defargs.cpp.
Definition at line 1097 of file defargs.cpp.
#define yytext defargsYYtext |
Definition at line 22 of file defargs.cpp.
#define yytext_ptr defargsYYtext |
Definition at line 368 of file defargs.cpp.
#define yywrap defargsYYwrap |
Definition at line 23 of file defargs.cpp.
typedef short int flex_int16_t |
Definition at line 71 of file defargs.cpp.
typedef int flex_int32_t |
Definition at line 72 of file defargs.cpp.
typedef signed char flex_int8_t |
Definition at line 70 of file defargs.cpp.
typedef unsigned short int flex_uint16_t |
Definition at line 74 of file defargs.cpp.
typedef unsigned int flex_uint32_t |
Definition at line 75 of file defargs.cpp.
typedef unsigned char flex_uint8_t |
Definition at line 73 of file defargs.cpp.
typedef struct yy_buffer_state* YY_BUFFER_STATE |
Definition at line 172 of file defargs.cpp.
typedef unsigned char YY_CHAR |
Definition at line 357 of file defargs.cpp.
typedef size_t yy_size_t |
Definition at line 203 of file defargs.cpp.
typedef int yy_state_type |
Definition at line 361 of file defargs.cpp.
YY_BUFFER_STATE defargsYY_create_buffer | ( | FILE * | file, |
int | size | ||
) |
Allocate and initialize an input buffer state.
file | A readable stream. |
size | The character buffer size in bytes. When in doubt, use YY_BUF_SIZE . |
Definition at line 2413 of file defargs.cpp.
void defargsYY_delete_buffer | ( | YY_BUFFER_STATE | b | ) |
Destroy the buffer.
b | a buffer created with defargsYY_create_buffer() |
Definition at line 2441 of file defargs.cpp.
void defargsYY_flush_buffer | ( | YY_BUFFER_STATE | b | ) |
Discard all buffered characters. On the next scan, YY_INPUT will be called.
b | the buffer state to be flushed, usually YY_CURRENT_BUFFER . |
Definition at line 2488 of file defargs.cpp.
|
static |
Definition at line 2460 of file defargs.cpp.
|
static |
Definition at line 2399 of file defargs.cpp.
YY_BUFFER_STATE defargsYY_scan_buffer | ( | char * | base, |
yy_size_t | size | ||
) |
Setup the input buffer state to scan directly from a user-specified character buffer.
base | the character buffer |
size | the size in bytes of the character buffer |
Definition at line 2615 of file defargs.cpp.
YY_BUFFER_STATE defargsYY_scan_bytes | ( | yyconst char * | yybytes, |
int | _yybytes_len | ||
) |
Setup the input buffer state to scan the given bytes. The next call to defargsYYlex() will scan from a copy of bytes.
bytes | the byte buffer to scan |
len | the number of bytes in the buffer pointed to by bytes. |
Definition at line 2665 of file defargs.cpp.
YY_BUFFER_STATE defargsYY_scan_string | ( | yyconst char * | yystr | ) |
Setup the input buffer state to scan a string. The next call to defargsYYlex() will scan from a copy of str.
yystr | a NUL-terminated string to scan |
Definition at line 2652 of file defargs.cpp.
void defargsYY_switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer | ) |
Switch to a different input buffer.
new_buffer | The new input buffer. |
Definition at line 2368 of file defargs.cpp.
void * defargsYYalloc | ( | yy_size_t | size | ) |
Definition at line 2884 of file defargs.cpp.
|
static |
Definition at line 2566 of file defargs.cpp.
void defargsYYfree | ( | void * | ptr | ) |
Definition at line 2901 of file defargs.cpp.
int defargsYYget_debug | ( | void | ) |
Definition at line 2792 of file defargs.cpp.
YY_EXTRA_TYPE defargsYYget_extra | ( | void | ) |
FILE * defargsYYget_in | ( | void | ) |
Get the input stream.
Definition at line 2736 of file defargs.cpp.
int defargsYYget_leng | ( | void | ) |
Get the length of the current token.
Definition at line 2752 of file defargs.cpp.
int defargsYYget_lineno | ( | void | ) |
FILE * defargsYYget_out | ( | void | ) |
Get the output stream.
Definition at line 2744 of file defargs.cpp.
char * defargsYYget_text | ( | void | ) |
int defargsYYlex | ( | void | ) |
int defargsYYlex_destroy | ( | void | ) |
Definition at line 2836 of file defargs.cpp.
void defargsYYpop_buffer_state | ( | void | ) |
Removes and deletes the top of the stack, if present. The next element becomes the new top.
Definition at line 2547 of file defargs.cpp.
void defargsYYpush_buffer_state | ( | YY_BUFFER_STATE | new_buffer | ) |
Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.
new_buffer | The new state. |
Definition at line 2517 of file defargs.cpp.
void * defargsYYrealloc | ( | void * | ptr, |
yy_size_t | size | ||
) |
Definition at line 2889 of file defargs.cpp.
void defargsYYrestart | ( | FILE * | input_file | ) |
Immediately switch to a different input stream.
input_file | A readable stream. |
INITIAL
. Definition at line 2351 of file defargs.cpp.
void defargsYYset_debug | ( | int | debug_flag | ) |
Definition at line 2797 of file defargs.cpp.
void defargsYYset_extra | ( | YY_EXTRA_TYPE | user_defined | ) |
void defargsYYset_in | ( | FILE * | in_str | ) |
Set the input stream. This does not discard the current input buffer.
in_str | A readable stream. |
Definition at line 2782 of file defargs.cpp.
void defargsYYset_lineno | ( | int | line_number | ) |
void defargsYYset_out | ( | FILE * | out_str | ) |
Definition at line 2787 of file defargs.cpp.
if | ( | ! | yy_init | ) |
Definition at line 1151 of file defargs.cpp.
void stringToArgumentList | ( | const char * | argsString, |
ArgumentList * | al, | ||
QCString * | extraTypeChars | ||
) |
Converts an argument string into an ArgumentList.
[in] | argsString | the list of Arguments. |
[out] | al | a reference to resulting argument list pointer. |
[out] | extraTypeChars | point to string to which trailing characters for complex types are written to |
Definition at line 2922 of file defargs.cpp.
while | ( | 1 | ) |
Definition at line 1183 of file defargs.cpp.
|
static |
|
static |
Definition at line 2699 of file defargs.cpp.
|
static |
Definition at line 2080 of file defargs.cpp.
|
static |
Definition at line 2185 of file defargs.cpp.
|
static |
Definition at line 2802 of file defargs.cpp.
|
static |
Definition at line 2216 of file defargs.cpp.
|
static |
Definition at line 923 of file defargs.cpp.
|
static |
|
static |
Definition at line 2235 of file defargs.cpp.
int defargsYY_flex_debug = 0 |
Definition at line 808 of file defargs.cpp.
FILE * defargsYYin = (FILE *) 0 |
Definition at line 359 of file defargs.cpp.
int defargsYYleng |
Definition at line 294 of file defargs.cpp.
int defargsYYlineno = 1 |
Definition at line 365 of file defargs.cpp.
FILE * defargsYYout = (FILE *) 0 |
Definition at line 359 of file defargs.cpp.
char * defargsYYtext |
Definition at line 832 of file defargs.cpp.
|
static |
Definition at line 911 of file defargs.cpp.
|
static |
Definition at line 899 of file defargs.cpp.
|
static |
Definition at line 909 of file defargs.cpp.
|
static |
Definition at line 910 of file defargs.cpp.
|
static |
Definition at line 900 of file defargs.cpp.
|
static |
Definition at line 906 of file defargs.cpp.
|
static |
Definition at line 905 of file defargs.cpp.
|
static |
Definition at line 902 of file defargs.cpp.
|
static |
Definition at line 904 of file defargs.cpp.
|
static |
Definition at line 903 of file defargs.cpp.
|
static |
Definition at line 901 of file defargs.cpp.
|
static |
Definition at line 907 of file defargs.cpp.
|
static |
Definition at line 916 of file defargs.cpp.
|
static |
Definition at line 908 of file defargs.cpp.
|
static |
Definition at line 898 of file defargs.cpp.
|
static |
Definition at line 897 of file defargs.cpp.
|
static |
Definition at line 914 of file defargs.cpp.
|
static |
Definition at line 913 of file defargs.cpp.
|
static |
Definition at line 915 of file defargs.cpp.
|
static |
Definition at line 912 of file defargs.cpp.
|
static |
Definition at line 435 of file defargs.cpp.
|
static |
Definition at line 394 of file defargs.cpp.
register int yy_act |
Definition at line 1144 of file defargs.cpp.
|
static |
Definition at line 509 of file defargs.cpp.
register char * yy_bp |
Definition at line 1143 of file defargs.cpp.
|
static |
Stack as an array.
Definition at line 274 of file defargs.cpp.
|
static |
capacity of stack.
Definition at line 273 of file defargs.cpp.
|
static |
index of top of stack.
Definition at line 272 of file defargs.cpp.
|
static |
Definition at line 297 of file defargs.cpp.
|
static |
Definition at line 697 of file defargs.cpp.
register char* yy_cp |
Definition at line 1143 of file defargs.cpp.
YY_DECL |
The main scanner function which does all the work.
Definition at line 1141 of file defargs.cpp.
|
static |
Definition at line 548 of file defargs.cpp.
|
static |
Definition at line 304 of file defargs.cpp.
|
static |
Definition at line 468 of file defargs.cpp.
|
static |
Definition at line 814 of file defargs.cpp.
|
static |
Definition at line 811 of file defargs.cpp.
|
static |
Definition at line 815 of file defargs.cpp.
|
static |
Definition at line 292 of file defargs.cpp.
|
static |
Definition at line 298 of file defargs.cpp.
|
static |
Definition at line 813 of file defargs.cpp.
|
static |
Definition at line 812 of file defargs.cpp.
|
static |
Definition at line 500 of file defargs.cpp.
|
static |
Definition at line 293 of file defargs.cpp.
|
static |
Definition at line 587 of file defargs.cpp.
|
static |
Definition at line 299 of file defargs.cpp.
|
static |
Definition at line 810 of file defargs.cpp.
|
static |
Definition at line 810 of file defargs.cpp.