From bd5d4684321ec15df3aa4c48cdcce78fbdc1f0e9 Mon Sep 17 00:00:00 2001 From: sienkiew Date: Thu, 28 Jun 2012 20:51:06 +0000 Subject: non-conditional hostgroups; nested hostgroups git-svn-id: https://svn.stsci.edu/svn/ssb/etal/steuermann/trunk@736 d34015c8-bcbb-4646-8ac8-8ba5febf221d --- steuermann/specfile.exy | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/steuermann/specfile.exy b/steuermann/specfile.exy index 4353069..73a5b20 100644 --- a/steuermann/specfile.exy +++ b/steuermann/specfile.exy @@ -55,14 +55,18 @@ parser specfile: ## rule hostgroup_def : HOSTGROUP hostgroup {{ nodes.define_hostgroup( hostgroup) }} - ( hostgroup_if<> )+ + ( hostgroup_front<> hostgroup_back<> )+ - rule hostgroup_if<> : + rule hostgroup_front<> : IF name - {{ accept_nodes = nodes.check_condition(name, self._scanner.filename ) }} + {{ return nodes.check_condition(name, self._scanner.filename ) }} + | {{ return True }} + + rule hostgroup_back<> : COLON ( name {{ if accept_nodes : nodes.add_hostgroup( hg, name ) }} - )+ + | hostgroup {{ if accept_nodes : nodes.add_hostgroup( hg, hostgroup ) }} + )* rule command_list: # one or more commands, appended together into a list -- cgit