Commit 501e3bbf authored by gourne_o's avatar gourne_o
Browse files

from Olivier Gournet <gourne_o@lrde.epita.fr>

	* src/disamb/disambiguate/ForInitStatementAmbiguityCandidate.meta,
	* src/disamb/disambiguate/ForInitStatementAmbiguityCut.str,
	* src/disamb/disambiguate/ForInitStatementAmbiguityCut.meta,
	* src/disamb/disambiguate/ForInitStatementAmbiguityCandidate.str,
	* src/disamb/disambiguate/ForInitStatementAmbiguity.str: New.
	* src/disamb/disambiguate/TemplateClassTraverse.str: Add import.
	* src/disamb/disambiguate/ResolveCompound.str: Call ForInitStatementAmbiguity.
	* src/disamb/disambiguate/Makefile.am: Update.
parent 8ac97d43
2004-05-18 Olivier Gournet <gourne_o@lrde.epita.fr>
* src/disamb/disambiguate/ForInitStatementAmbiguityCandidate.meta,
* src/disamb/disambiguate/ForInitStatementAmbiguityCut.str,
* src/disamb/disambiguate/ForInitStatementAmbiguityCut.meta,
* src/disamb/disambiguate/ForInitStatementAmbiguityCandidate.str,
* src/disamb/disambiguate/ForInitStatementAmbiguity.str: New.
* src/disamb/disambiguate/TemplateClassTraverse.str: Add import.
* src/disamb/disambiguate/ResolveCompound.str: Call ForInitStatementAmbiguity.
* src/disamb/disambiguate/Makefile.am: Update.
2004-05-16 Olivier Gournet <gourne_o@lrde.epita.fr>
* properties: Add svn:ignore on all directories to make 'svn status'
......
/*
* ForInitStatementAmbiguity.str:
* this file is a part of CxxGrammar from the Transformers project.
* Copyright (C) 2004 EPITA Research and Development Laboratory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
module ForInitStatementAmbiguity
imports
lib
imports
AsFix
Identifier
ForInitStatementAmbiguityCut
ForInitStatementAmbiguityCandidate
Kinds
rules
ForInitStatementAmbiguity : amb (a) -> b
where < getfirst (for-init-statement-ambiguity-cut) > a => b
strategies
for-init-statement-ambiguity-stop(s) = for-init-statement-ambiguity-candidate
for-init-statement-ambiguity = (for-init-statement-ambiguity-candidate;
ForInitStatementAmbiguity)
/*
* ForInitStatementAmbiguityCandidate.str:
* this file is a part of CxxGrammar from the Transformers project.
* Copyright (C) 2004 EPITA Research and Development Laboratory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
module ForInitStatementAmbiguityCandidate
imports
lib
rules
ForInitStatementAmbiguityCandidate : a@amb (l) -> a
where <[id,id]; map(
?|ForInitStatement[ ~SimpleDeclaration: _~ ]|
+ ?|ForInitStatement[ ~ExpressionStatement: _~ ]|)> l
; < ifdebug (debug) > "Candidate for for init statement ambiguity"
strategies
for-init-statement-ambiguity-candidate = ForInitStatementAmbiguityCandidate
/*
* ForInitStatementAmbiguityCut.str:
* this file is a part of CxxGrammar from the Transformers project.
* Copyright (C) 2004 EPITA Research and Development Laboratory.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
module ForInitStatementAmbiguityCut
imports
lib
rules
(*
** If SimpleDeclaration have no body, then this is an ExpressionStatement,
** else it's a SimpleDeclaration.
*)
ForInitStatementAmbiguityCut : |ForInitStatement[ ~SimpleDeclaration: amb([])~ ]| -> ()
strategies
for-init-statement-ambiguity-cut = not (ForInitStatementAmbiguityCut)
......@@ -26,6 +26,9 @@ SRCS = \
Definition.str \
EnumDefinition.str \
EnumDefinitionCandidate.str \
ForInitStatementAmbiguity.str \
ForInitStatementAmbiguityCandidate.str \
ForInitStatementAmbiguityCut.str \
FunctionDefinitionAmbiguity.str \
GetKey.str \
IfDebug.str \
......@@ -100,6 +103,8 @@ METAS = \
EnumDefinition.meta \
EnumDefinitionCandidate.meta \
FunctionDefinitionAmbiguity.meta \
ForInitStatementAmbiguityCandidate.meta \
ForInitStatementAmbiguityCut.meta \
GetKey.meta \
InitDeclaratorAmbiguity.meta \
LocalOrGlobal.meta \
......
......@@ -31,8 +31,9 @@ imports
ClassOrNamespaceAmbiguity
ClassTraverse
CompoundStatement
MemInitializerIdAmbiguity
DeclaratorIdAmbiguity
ForInitStatementAmbiguity
MemInitializerIdAmbiguity
NamespaceTraverse
PostfixExpressionAmbiguity
PrimaryExpression
......@@ -68,6 +69,7 @@ strategies
compound-statement-stop(s) <+
type-definition-stop(s) <+
variable-definition-stop(s) <+
for-init-statement-ambiguity-stop(s) <+
namespace-name-ambiguity-stop(s)
resolve-compound-single = namespace-traverse <+
......@@ -89,6 +91,7 @@ strategies
compound-statement <+
type-definition <+
variable-definition <+
for-init-statement-ambiguity <+
namespace-name-ambiguity <+
// ambiguity <+
not (namespace-traverse-candidate <+
......
......@@ -33,6 +33,7 @@ imports
Keys
Kinds
Resolve
TemplateClassDefinitionCandidate
rules
......
Markdown is supported
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