[aspectc-user] patch for making syncbuilder compile
Stefaan Himpe
stefaan.himpe at gmail.com
Sat Jan 5 14:54:18 CET 2008
Trying to send the patch as an attachment as well (as this is more
convenient than pasting it in the mail...)
I donate this patch (including all rights) to the AspectC++ development
team.
Best regards,
Stefaan.
Index: SyncTransformer.cc
===================================================================
--- SyncTransformer.cc (revision 46)
+++ SyncTransformer.cc (working copy)
@@ -117,12 +117,12 @@
// with the whole replacement token list. token() returns
// the first token referred in a sub-tree.
mc.replace(node->Son(0)->token(), node->Son(1)->token(),
- (Token*)lock.first(), (Token*)lock.last());
+ (Puma::Token*)lock.first(), (Puma::Token*)lock.last());
// Replace the closing bracket. The closing bracket is the
// last token of the statement. end_token() returns the last
// token referred in a sub-tree.
mc.replace(node->end_token(), node->end_token(),
- (Token*)unlock.first(), (Token*)unlock.last());
+ (Puma::Token*)unlock.first(), (Puma::Token*)unlock.last());
// Execute the two manipulations now, together. It is also
// possible first to check if the manipulations are valid
Index: sync.cc
===================================================================
--- sync.cc (revision 46)
+++ sync.cc (working copy)
@@ -96,7 +96,7 @@
// and is entirely realized on token level using the token
// list of the input file. First the corresponding include
// directive has to be scanned.
- Unit *pthread_inc = project.scanString("#include <pthread.h>\n");
+ Puma::Unit *pthread_inc = project.scanString("#include <pthread.h>\n");
// The resulting token list can now simply be prepended to
// the input file's token list. Token lists are organized
// as double-linked lists. Prepending something means to
@@ -126,5 +126,5 @@
delete tu;
// Return 1 if errors or fatal errors occurred.
- return err.severity() > sev_warning ? 1 : 0;
+ return err.severity() > Puma::sev_warning ? 1 : 0;
}
Index: SyncSyntax.cc
===================================================================
--- SyncSyntax.cc (revision 46)
+++ SyncSyntax.cc (working copy)
@@ -22,7 +22,6 @@
#include "SyncTokens.h"
#include "SyncTree.h"
-
SyncSyntax::SyncSyntax(SyncBuilder &b, SyncSemantic &s) :
CCSyntax(b, s) {
}
@@ -76,7 +75,7 @@
// Try to parse the "synchronized" keyword followed
// by the opening curly bracket.
- if (parse(TOK_SYNC) && parse(TOK_OPEN_CURLY)) {
+ if (parse(TOK_SYNC) && parse(Puma::TOK_OPEN_CURLY)) {
// If the names declared in a "synchronized" block shall
// be local to that block, a local scope has to be entered
// by calling the semantic object method enter_local_scope().
@@ -91,7 +90,7 @@
// Try to parse every statement (if any) up to the next
// closing curly bracket on the same nesting level.
- if (parse(&SyncSyntax::stmt_seq), parse(TOK_CLOSE_CURLY)) {
+ if (parse(&SyncSyntax::stmt_seq), parse(Puma::TOK_CLOSE_CURLY)) {
// Check if the "synchronized" statement is nested.
// Build the corresponding syntax tree if it is not
// nested, otherwise generate an error message and
Index: SyncBuilder.h
===================================================================
--- SyncBuilder.h (revision 46)
+++ SyncBuilder.h (working copy)
@@ -26,7 +26,7 @@
class SyncBuilder : public Puma::CCBuilder {
public:
// A.5 Statements.
- virtual CTree *sync_stmt();
+ virtual Puma::CTree *sync_stmt();
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: syncbuilder.diff.gz
Type: application/gzip
Size: 1238 bytes
Desc: not available
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20080105/f24b76ab/attachment.bin>
More information about the aspectc-user
mailing list