lestes::lang::cplus::syn::syntax_error Class Reference

#include <errors.hh>

List of all members.

Static Public Member Functions

static void disa_stmt (ptr< bison_pack_token > error_pack, ptr< source_location > suberr_loc1, ptr< source_location > suberr_loc2)
 Report that statement disambiguation failed.
static void condition (ptr< bison_pack_token > error_pack, ptr< source_location > suberr_loc1, ptr< source_location > suberr_loc2)
 Reports error in condition.

Private Member Functions

 syntax_error ()
 Hide default constructor.
 syntax_error (const syntax_error &)
 Hide copy-constructor.


Detailed Description

Definition at line 38 of file errors.hh.


Constructor & Destructor Documentation

lestes::lang::cplus::syn::syntax_error::syntax_error (  )  [private]

Hide default constructor.

lestes::lang::cplus::syn::syntax_error::syntax_error ( const syntax_error  )  [private]

Hide copy-constructor.


Member Function Documentation

void lestes::lang::cplus::syn::syntax_error::disa_stmt ( ptr< bison_pack_token error_pack,
ptr< source_location >  suberr_loc1,
ptr< source_location >  suberr_loc2 
) [static]

Report that statement disambiguation failed.

Definition at line 37 of file errors.cc.

References lestes::lang::cplus::syn::cont_here, lestes::lang::cplus::syn::disa_failed, lestes::lang::cplus::syn::or_here, lestes::report, and lestes::lang::cplus::syn::sub_error.

00039 {
00040 #if OLD_ERROR_WANTED
00041         ptr<source_location> at_loc = error_pack->location_get();
00042         report << disa_failed << at_loc;
00043         if (suberr_loc1->order_get() != at_loc->order_get())
00044                 report << sub_error << suberr_loc1;
00045         if (suberr_loc2->order_get() != at_loc->order_get() &&
00046                         suberr_loc2->order_get() != suberr_loc1->order_get())
00047                 report << sub_error << suberr_loc2;
00048 #else
00049         report << disa_failed << suberr_loc1;
00050         if (suberr_loc2->order_get() != suberr_loc1->order_get())
00051                 report << or_here << suberr_loc2;
00052 #endif
00053         report << cont_here << error_pack->end_location_get();
00054 }

void lestes::lang::cplus::syn::syntax_error::condition ( ptr< bison_pack_token error_pack,
ptr< source_location >  suberr_loc1,
ptr< source_location >  suberr_loc2 
) [static]

Reports error in condition.

Definition at line 56 of file errors.cc.

References lestes::lang::cplus::syn::empty_condition, lestes::lang::cplus::syn::invalid_cond, lestes::lang::cplus::syn::or_here, and lestes::report.

00058 {
00059         /* if the pack is empty, the condition "body" was empty, report it
00060          * note that in for statement -- where empty conditions are allowed -- we handle
00061          *   this case without running disambiguation, which means that this method
00062          *   is not called then
00063          */
00064         if (error_pack->pack_get()->empty())
00065                 report << empty_condition << error_pack->location_get();
00066         else {
00067                 report << invalid_cond << suberr_loc1;
00068                 if (suberr_loc2->order_get() != suberr_loc1->order_get())
00069                         report << or_here << suberr_loc2;
00070         }
00071 }


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:25:37 2007 for lestes by doxygen 1.5.1-20070107