Commit 5e42b478 authored by david_v's avatar david_v
Browse files

2004-02-25 Valentin David <valentin@lrde.epita.fr>

	* test/disambiguate/funcdef-01.detcc,
	* test/disambiguate/funcdef-01.cc,
	* test/disambiguate/funcdef-02.cc
	* test/disambiguate/funcdef-02.detcc,
	* test/disambiguate/return-01.cc,
	* test/disambiguate/return-01.detcc: New.

	* test/g++/Makefile.am, test/disambiguate/Makefile.am: Update.

	* src/disamb/declaration/DeclarationCut.str,
	* src/disamb/declaration/DeclarationCandidate.str:
	Disambiguate member functions.

	* src/disamb/declaration/IfDebug.str: Use the verbose parameter.

	* src/syn/MemberSpecifications.sdf: Add a dettag for member functions.

	* src/disamb/specifier/Stop.str: Delete some compilation warnings.

	* src/disamb/disambiguate/Makefile.am: Fix.
parent 6e7caf1b
2004-02-25 Valentin David <valentin@lrde.epita.fr>
* test/disambiguate/funcdef-01.detcc,
* test/disambiguate/funcdef-01.cc,
* test/disambiguate/funcdef-02.cc
* test/disambiguate/funcdef-02.detcc,
* test/disambiguate/return-01.cc,
* test/disambiguate/return-01.detcc: New.
* test/g++/Makefile.am, test/disambiguate/Makefile.am: Update.
* src/disamb/declaration/DeclarationCut.str,
* src/disamb/declaration/DeclarationCandidate.str:
Disambiguate member functions.
* src/disamb/declaration/IfDebug.str: Use the verbose parameter.
* src/syn/MemberSpecifications.sdf: Add a dettag for member functions.
* src/disamb/specifier/Stop.str: Delete some compilation warnings.
* src/disamb/disambiguate/Makefile.am: Fix.
2004-02-25 Nicolas Pouillard <pouill_n@lrde.epita.fr>
* src/syn/AccessSpecifiers.sdf, src/syn/AdditiveExpressions.sdf,
......
......@@ -48,9 +48,18 @@ rules
where < ifdebug (debug) > "+ Candidate for parameter declaration"
; < ifdebug (debug) > "- Candidate for parameter declaration"
DeclarationCandidate-4 : a@|MemberSpecification[ MemberDeclaration MemberSpecification-opt ]| -> a
where < ifdebug (debug) > "+ Candidate for member specification"
; < ifdebug (debug) > "- Candidate for member specification"
DeclarationCandidate-4 : a@|MemberSpecification[ AccessSpecifier : MemberSpecification-opt ]| -> a
where < ifdebug (debug) > "+ Candidate for member specification"
; < ifdebug (debug) > "- Candidate for member specification"
strategies
declaration-candidate-0 = DeclarationCandidate-0
declaration-candidate-1 = DeclarationCandidate-1
declaration-candidate-2 = DeclarationCandidate-2
declaration-candidate-3 = DeclarationCandidate-3
declaration-candidate-4 = DeclarationCandidate-4
......@@ -41,6 +41,12 @@ rules
DeclarationCut-3 : a@|ParameterDeclaration[ DeclSpecifierSeq = AssignmentExpression ]| -> a
where < debug > "Removed a parameter declaration with empty declarator list"
MemDecl : a@|MemberDeclaration[ DeclSpecifierSeq-opt MemberDeclaratorList-opt ; ]| -> a
MemDecl : a@|MemberDeclaration[ FunctionDefinition Dummy6-opt ]| -> a
MemDecl : a@|MemberDeclaration[ NestedNameSpecifier Dummy5-opt UnqualifiedId ; ]| -> a
MemDecl : a@|MemberDeclaration[ UsingDeclaration ]| -> a
MemDecl : a@|MemberDeclaration[ TemplateDeclaration ]| -> a
strategies
declaration-cut = (declaration-candidate-0;
......@@ -51,7 +57,15 @@ strategies
not (DeclarationCut-2)) <+
(declaration-candidate-3;
not (DeclarationCut-3)) <+
// Function can have a semi colon at the end of definition.
// Ambiguities are placed on the memberspecifier.
(declaration-candidate-4;
?value;
collect(MemDecl);
map(not(DeclarationCut-1));
!value) <+
(not (declaration-candidate-0 <+
declaration-candidate-1 <+
declaration-candidate-2 <+
declaration-candidate-3))
declaration-candidate-3 <+
declaration-candidate-4))
......@@ -20,4 +20,4 @@ module IfDebug
strategies
ifdebug (s) = s
ifdebug (s) = if-verbose2(s)
......@@ -135,10 +135,6 @@ SRCS = \
VariableDefinitionCandidate.str \
afcxx-disambiguate.str
afcxx-disambiguate.c: $(SRCS:.str=.rtree)
.str.rtree:
$(PARSESTRATEGO) $(STRINCLUDES) -i $< -o $@ --verbose 0 --asfix
SCFLAGS = --main $* --verbose 0 --asfix
STRINCLUDES = -I $(ASFIX_TOOLS)/share/asfix-tools \
-I $(top_builddir)/src/strategocxx \
......
......@@ -28,4 +28,4 @@ rules
strategies
stop = Stop-0
stop(s) = Stop-0
......@@ -33,7 +33,7 @@ exports
DeclSpecifierSeq? MemberDeclaratorList? ";" -> MemberDeclaration
{pp(H hs=0[H[_1 _2] KW[";"]])}
FunctionDefinition ";"? -> MemberDeclaration
{pp(H hs=0[_1 _2], .2:opt=KW[";"])}
{pp(H hs=0[_1 _2], .2:opt=KW[";"]), dettag("funcdef")}
"::"? NestedNameSpecifier "template"? UnqualifiedId ";" -> MemberDeclaration
{pp(H hs=0[H[_1 _2 _3 _4] KW[";"]], .1:opt=KW["::"], .3:opt=KW["template"] )}
UsingDeclaration -> MemberDeclaration
......
......@@ -14,7 +14,8 @@ dirs:
echo "SRCDIR=\"$(srcdir)\"" >dirs
XFAIL_TESTS = \
template-08.test
template-08.test \
return-01.test
TESTS = \
alias-01.test \
......@@ -29,6 +30,8 @@ TESTS = \
enum-03.test \
enum-04.test \
factorial-01.test \
funcdef-01.test \
funcdef-02.test \
function-01.test \
function-02.test \
function-03.test \
......@@ -66,6 +69,7 @@ TESTS = \
sizeof-01.test \
sizeof-02.test \
struct-01.test \
return-01.test \
template-01.test \
template-02.test \
template-03.test \
......
struct A {
void f () {}
void g () {};
};
struct A {
void /*<uid>*/f/*</uid>*/ () {}
/*<funcdef>*/void /*<uid>*/g/*</uid>*/ () {};/*</funcdef>*/
};
void /*<uid>*/f/*</uid>*/ () {}
void /*<uid>*/g/*</uid>*/ () {};
struct D {
void d();
};
void D::d() {}
struct D {
void /*<uid>*/d/*</uid>*/();
};
void /*<nns>*//*<cl>*/D/*</cl>*/::/*</nns>*//*<uid>*/d/*</uid>*/() {}
......@@ -21,7 +21,6 @@ TESTS_ENVIRONMENT = XTC_REPOSITORY=XTC
XFAIL_TESTS = \
abi/bitfield6.test \
abi/dcast1.test \
abi/dtor1.test \
abi/mangle10.test \
abi/mangle12.test \
......@@ -114,7 +113,6 @@ XFAIL_TESTS = \
init/enum2.test \
init/init-ref1.test \
init/init-ref2.test \
init/init-ref3.test \
init/new1.test \
init/new2.test \
init/new5.test \
......@@ -129,10 +127,8 @@ XFAIL_TESTS = \
lookup/class-member-1.test \
lookup/decl2.test \
lookup/delete1.test \
lookup/disamb1.test \
lookup/friend1.test \
lookup/koenig2.test \
lookup/pretty1.test \
lookup/scoped1.test \
lookup/scoped6.test \
lookup/struct-hack1.test \
......@@ -170,7 +166,6 @@ XFAIL_TESTS = \
opt/strength-reduce.test \
opt/thunk1.test \
opt/unroll1.test \
opt/vt1.test \
other/access1.test \
other/anon-struct.test \
other/anon-union.test \
......@@ -293,7 +288,6 @@ XFAIL_TESTS = \
template/qualttp17.test \
template/qualttp21.test \
template/qualttp9.test \
template/ref1.test \
template/restrict1.test \
template/sizeof1.test \
template/sizeof2.test \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment