<COMMENT>"*/" { yy_pop_state(); }
DeclException[0-9] { yylval = string("@") + string(yytext); return(DECLEXCEPTION); }
+<EXC_IGNORE>"(" { yy_push_state(EXC_IGNORE); }
+<EXC_IGNORE>")" { yy_pop_state(); }
<EXC_IGNORE>.
<EXC_IGNORE>\n
-<EXC_IGNORE>");" { yy_pop_state(); }
"//" { yy_push_state(LINECOMMENT); }
<LINECOMMENT>.
/* scan CVS id in file preamble */
-"$Id$" { cvs_id = string(yytext); }
-<LINECOMMENT>"$Id$" { cvs_id = string(yytext); }
-<COMMENT>"$Id$" { cvs_id = string(yytext); }
+"$Id$]*"$" { cvs_id = string(yytext); }
+<LINECOMMENT>"$Id$]*"$" { cvs_id = string(yytext); }
+<COMMENT>"$Id$]*"$" { cvs_id = string(yytext); }
/* Ignore function bodies */
typedef { return TYPEDEF; }
namespace { return NAMESPACE; }
using { return USING; }
+long { return LONG; }
typename {}
{CLASS} { yylval = string(yytext); return CLASS; }
yy_push_state(INFUNCTION);
}
+void enterexc()
+{
+ yy_push_state(EXC_IGNORE);
+}
+
void enterbaseinitializers()
{
yy_push_state(BASEINIT);
int yylex();
void enterfunction();
+void enterexc();
void enterbaseinitializers();
string doctext;
%token OP
%token TEMPLATE
%token UNSIGNED
+%token LONG
%token INT
%token FLOAT
%token CHAR
class_name = class_stack.top() + string("::") + class_name;
class_stack.push(class_name);
access_stack.push(string("private"));
+ cout << "@@@" << endl;
} '{' class_body '}'
{
class_stack.pop();
vartype:
identifier { $$ = $1; }
+ | LONG IDENTIFIER { $$ = string("long ") + $2; }
| UNSIGNED IDENTIFIER { $$ = string("unsigned ") + $2; }
| CONST vartype { $$ = string("const ") + $2; }
| vartype '*' CONST { $$ = $1 + string("* const"); }
;
deal_exception_declaration:
- DECLEXCEPTION '(' IDENTIFIER deal_exception_arglist ')'
+ DECLEXCEPTION '(' IDENTIFIER
{ cout << setw(OUTW) << $1 << ':' << $3 << endl
<< setw(OUTW) << "@In-Class:" << class_stack.top() << endl
<< setw(OUTW) << "@Access:" << access_stack.top() << endl;
- printdoc(cout); }
+ printdoc(cout);
+ enterexc();
+ }
;
deal_exception_arglist: /* empty */
;
deal_exception_output_declaration: OP
- | deal_exception_output_declaration vartype
+ | expression
+/* | deal_exception_output_declaration vartype
| deal_exception_output_declaration literal
- | deal_exception_output_declaration OP
+ | deal_exception_output_declaration OP */
;
%%