/* * TemplateDefinition.str: * this file is a part of CxxGrammar from the Transformers project. * Copyright (C) 2003, 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 TemplateDefinition imports lib imports AsFix Cxx Identifier Kinds Parameter TemplateDefinitionCandidate rules TemplateDefinition : a@|TemplateDeclaration[ Dummy2-opt la1 template la2 < la3 TemplateParameterList la4 > la5 Declaration ]| -> |TemplateDeclaration[ Dummy2-opt la1 template la2 < la3 TemplateParameterList' la4 > la5 Declaration' ]| where < begin-scope (!"$template") > a ; < begin-scope (!"$template-parameters") > a ; < resolve > TemplateParameterList => TemplateParameterList' ; < parameters-decl > TemplateParameterList' => l ; < my-assert (!"$template") > ("$value", l) ; < my-assert (!"$template-parameters") > ("$value", l) ; < definition > Declaration => Declaration' strategies template-definition-stop(s) = template-definition-candidate template-definition = (template-definition-candidate; TemplateDefinition)