]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Parsing possible
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 Jun 1999 20:18:34 +0000 (20:18 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 Jun 1999 20:18:34 +0000 (20:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@1442 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/parser/dealparse.l
deal.II/doc/parser/dealparse.y

index b66669cadc928828472070af12713c4d37f658b9..87e8908c7c4b901394ab77d2621c0346d8e52f9c 100644 (file)
@@ -45,9 +45,10 @@ OP \+|\-|\/|\||\^|(==)|(!=)|(<<)|(>>)|(->)|(\+\+)|(\-\-)
 <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>.
@@ -55,9 +56,9 @@ DeclException[0-9]  { yylval = string("@") + string(yytext); return(DECLEXCEPTIO
 
  /* 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 */
@@ -95,6 +96,7 @@ friend    { return FRIEND; }
 typedef   { return TYPEDEF; }
 namespace { return NAMESPACE; }
 using     { return USING; }
+long      { return LONG; }
 typename {}
 
 {CLASS}  { yylval = string(yytext); return CLASS; }
@@ -126,6 +128,11 @@ void enterfunction()
   yy_push_state(INFUNCTION);
 }
 
+void enterexc()
+{
+  yy_push_state(EXC_IGNORE);
+}
+
 void enterbaseinitializers()
 {
   yy_push_state(BASEINIT);
index dac843d64089420952666feb1cad3a9dd5d02628..9b8a3920ee39d70ba026141e39b7fa62efa0b56a 100644 (file)
@@ -13,6 +13,7 @@ stack<string> access_stack;
 
 int yylex();
 void enterfunction();
+void enterexc();
 void enterbaseinitializers();  
 
 string doctext;
@@ -49,6 +50,7 @@ void yyerror(const char* s)
 %token OP
 %token TEMPLATE
 %token UNSIGNED
+%token LONG
 %token INT
 %token FLOAT
 %token CHAR
@@ -255,6 +257,7 @@ class_declaration: class_head
       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();
@@ -312,6 +315,7 @@ friend_declaration:
 
 vartype:
   identifier { $$ = $1; }
+  | LONG IDENTIFIER { $$ = string("long ") + $2; }
   | UNSIGNED IDENTIFIER { $$ = string("unsigned ") + $2; }
   | CONST vartype { $$ = string("const ") + $2; }
   | vartype '*' CONST { $$ = $1 +  string("* const"); }
@@ -380,11 +384,13 @@ template_declaration:
 ;
 
 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 */
@@ -398,9 +404,10 @@ deal_exception_arg:
 ;
 
 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 */
 ;
 
 %%

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.