]> granicus.if.org Git - icinga2/commitdiff
Implement an alias for "abstract object".
authorGunnar Beutner <gunnar.beutner@netways.de>
Sat, 16 Feb 2013 08:18:34 +0000 (09:18 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sat, 16 Feb 2013 08:18:34 +0000 (09:18 +0100)
Fixes #3707

16 files changed:
contrib/config/icinga2_demo0_basic.conf
contrib/config/icinga2_demo1_hostcheck.conf
contrib/config/icinga2_demo2_hostgroup.conf
contrib/config/icinga2_demo3_abstract.conf
contrib/config/icinga2_demo4_distm.conf
contrib/config/icinga2_demo5_distm_bench.conf
contrib/config/icinga2_masshosts.conf
docs/icinga2-config.txt
itl/notification.conf
itl/service-common.conf
itl/service.conf
lib/config/config_lexer.cc
lib/config/config_lexer.ll
lib/config/config_parser.cc
lib/config/config_parser.h
lib/config/config_parser.yy

index d87dc04619a44af5b084500ff0d802eb3bc1d188..a700888c8124e55dbd56398b489d9d7311308611 100644 (file)
@@ -70,7 +70,7 @@ local object Component "compatido" {
  * This template defines some basic parameters for services that use
  * external plugins for their checks.
  */
-abstract object Service "icinga-service" {
+template Service "icinga-service" {
   methods = {
     check = "PluginCheck"
   }
@@ -84,7 +84,7 @@ abstract object Service "icinga-service" {
 /**
  * ping
  */
-abstract object Service "ping4" inherits "icinga-service" {
+template Service "ping4" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -97,7 +97,7 @@ abstract object Service "ping4" inherits "icinga-service" {
 /**
  * ping6
  */
-abstract object Service "ping6" inherits "icinga-service" {
+template Service "ping6" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -110,21 +110,21 @@ abstract object Service "ping6" inherits "icinga-service" {
 /**
  * http
  */
-abstract object Service "http" inherits "icinga-service" {
+template Service "http" inherits "icinga-service" {
   check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
 }
 
 /**
  * ssh
  */
-abstract object Service "ssh" inherits "icinga-service" {
+template Service "ssh" inherits "icinga-service" {
   check_command = "$plugindir$/check_ssh '$address$'",
 }
 
 /**
  * local checks
  */
-abstract object Service "disk space" inherits "icinga-service" {
+template Service "disk space" inherits "icinga-service" {
   check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
   macros += {
     wfree = "20%",
@@ -132,7 +132,7 @@ abstract object Service "disk space" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current users" inherits "icinga-service" {
+template Service "current users" inherits "icinga-service" {
   check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 20,
@@ -140,7 +140,7 @@ abstract object Service "current users" inherits "icinga-service" {
   }
 }
 
-abstract object Service "total processes" inherits "icinga-service" {
+template Service "total processes" inherits "icinga-service" {
   check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 250,
@@ -148,7 +148,7 @@ abstract object Service "total processes" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current load" inherits "icinga-service" {
+template Service "current load" inherits "icinga-service" {
   check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
   macros += {
     wload1 = 5.0,
@@ -163,7 +163,7 @@ abstract object Service "current load" inherits "icinga-service" {
 /**
  * demo check
  */
-abstract object Service "demo" inherits "icinga-service" {
+template Service "demo" inherits "icinga-service" {
   check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
 }
 
index d2c46f3ac0be309491d6e22f5b277caf65699cc1..2e5ecca72d18fc4e8f3f430ac423ab18623f9d92 100644 (file)
@@ -70,7 +70,7 @@ local object Component "compatido" {
  * This template defines some basic parameters for services that use
  * external plugins for their checks.
  */
-abstract object Service "icinga-service" {
+template Service "icinga-service" {
   methods = {
     check = "PluginCheck"
   }
@@ -84,7 +84,7 @@ abstract object Service "icinga-service" {
 /**
  * ping
  */
-abstract object Service "ping4" inherits "icinga-service" {
+template Service "ping4" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -97,7 +97,7 @@ abstract object Service "ping4" inherits "icinga-service" {
 /**
  * ping6
  */
-abstract object Service "ping6" inherits "icinga-service" {
+template Service "ping6" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -110,21 +110,21 @@ abstract object Service "ping6" inherits "icinga-service" {
 /**
  * http
  */
-abstract object Service "http" inherits "icinga-service" {
+template Service "http" inherits "icinga-service" {
   check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
 }
 
 /**
  * ssh
  */
-abstract object Service "ssh" inherits "icinga-service" {
+template Service "ssh" inherits "icinga-service" {
   check_command = "$plugindir$/check_ssh '$address$'",
 }
 
 /**
  * local checks
  */
-abstract object Service "disk space" inherits "icinga-service" {
+template Service "disk space" inherits "icinga-service" {
   check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
   macros += {
     wfree = "20%",
@@ -132,7 +132,7 @@ abstract object Service "disk space" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current users" inherits "icinga-service" {
+template Service "current users" inherits "icinga-service" {
   check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 20,
@@ -140,7 +140,7 @@ abstract object Service "current users" inherits "icinga-service" {
   }
 }
 
-abstract object Service "total processes" inherits "icinga-service" {
+template Service "total processes" inherits "icinga-service" {
   check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 250,
@@ -148,7 +148,7 @@ abstract object Service "total processes" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current load" inherits "icinga-service" {
+template Service "current load" inherits "icinga-service" {
   check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
   macros += {
     wload1 = 5.0,
@@ -163,7 +163,7 @@ abstract object Service "current load" inherits "icinga-service" {
 /**
  * demo check
  */
-abstract object Service "demo" inherits "icinga-service" {
+template Service "demo" inherits "icinga-service" {
   check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
 }
 
index 561656d0084d3ce647c57d2f0656c0028d07714f..087f2e914fa9c1671f21a35c07788f9b986f6704 100644 (file)
@@ -70,7 +70,7 @@ local object Component "compatido" {
  * This template defines some basic parameters for services that use
  * external plugins for their checks.
  */
-abstract object Service "icinga-service" {
+template Service "icinga-service" {
   methods = {
     check = "PluginCheck"
   }
@@ -84,7 +84,7 @@ abstract object Service "icinga-service" {
 /**
  * ping
  */
-abstract object Service "ping4" inherits "icinga-service" {
+template Service "ping4" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -97,7 +97,7 @@ abstract object Service "ping4" inherits "icinga-service" {
 /**
  * ping6
  */
-abstract object Service "ping6" inherits "icinga-service" {
+template Service "ping6" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -110,21 +110,21 @@ abstract object Service "ping6" inherits "icinga-service" {
 /**
  * http
  */
-abstract object Service "http" inherits "icinga-service" {
+template Service "http" inherits "icinga-service" {
   check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
 }
 
 /**
  * ssh
  */
-abstract object Service "ssh" inherits "icinga-service" {
+template Service "ssh" inherits "icinga-service" {
   check_command = "$plugindir$/check_ssh '$address$'",
 }
 
 /**
  * local checks
  */
-abstract object Service "disk space" inherits "icinga-service" {
+template Service "disk space" inherits "icinga-service" {
   check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
   macros += {
     wfree = "20%",
@@ -132,7 +132,7 @@ abstract object Service "disk space" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current users" inherits "icinga-service" {
+template Service "current users" inherits "icinga-service" {
   check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 20,
@@ -140,7 +140,7 @@ abstract object Service "current users" inherits "icinga-service" {
   }
 }
 
-abstract object Service "total processes" inherits "icinga-service" {
+template Service "total processes" inherits "icinga-service" {
   check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 250,
@@ -148,7 +148,7 @@ abstract object Service "total processes" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current load" inherits "icinga-service" {
+template Service "current load" inherits "icinga-service" {
   check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
   macros += {
     wload1 = 5.0,
@@ -163,7 +163,7 @@ abstract object Service "current load" inherits "icinga-service" {
 /**
  * demo check
  */
-abstract object Service "demo" inherits "icinga-service" {
+template Service "demo" inherits "icinga-service" {
   check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
 }
 
index ac7e0f8f0b49562d744d9d698670c075bea825ce..31b0bf8608efac1c40768881de97afaffa76de9d 100644 (file)
@@ -70,7 +70,7 @@ local object Component "compatido" {
  * This template defines some basic parameters for services that use
  * external plugins for their checks.
  */
-abstract object Service "icinga-service" {
+template Service "icinga-service" {
   methods = {
     check = "PluginCheck"
   }
@@ -84,7 +84,7 @@ abstract object Service "icinga-service" {
 /**
  * ping
  */
-abstract object Service "ping4" inherits "icinga-service" {
+template Service "ping4" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -97,7 +97,7 @@ abstract object Service "ping4" inherits "icinga-service" {
 /**
  * ping6
  */
-abstract object Service "ping6" inherits "icinga-service" {
+template Service "ping6" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -110,21 +110,21 @@ abstract object Service "ping6" inherits "icinga-service" {
 /**
  * http
  */
-abstract object Service "http" inherits "icinga-service" {
+template Service "http" inherits "icinga-service" {
   check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
 }
 
 /**
  * ssh
  */
-abstract object Service "ssh" inherits "icinga-service" {
+template Service "ssh" inherits "icinga-service" {
   check_command = "$plugindir$/check_ssh '$address$'",
 }
 
 /**
  * local checks
  */
-abstract object Service "disk space" inherits "icinga-service" {
+template Service "disk space" inherits "icinga-service" {
   check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
   macros += {
     wfree = "20%",
@@ -132,7 +132,7 @@ abstract object Service "disk space" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current users" inherits "icinga-service" {
+template Service "current users" inherits "icinga-service" {
   check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 20,
@@ -140,7 +140,7 @@ abstract object Service "current users" inherits "icinga-service" {
   }
 }
 
-abstract object Service "total processes" inherits "icinga-service" {
+template Service "total processes" inherits "icinga-service" {
   check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 250,
@@ -148,7 +148,7 @@ abstract object Service "total processes" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current load" inherits "icinga-service" {
+template Service "current load" inherits "icinga-service" {
   check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
   macros += {
     wload1 = 5.0,
@@ -163,7 +163,7 @@ abstract object Service "current load" inherits "icinga-service" {
 /**
  * demo check
  */
-abstract object Service "demo" inherits "icinga-service" {
+template Service "demo" inherits "icinga-service" {
   check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
 }
 
@@ -194,7 +194,7 @@ object HostGroup "demogroup2" {
   alias = "Hostgroup Demo Number 2"
 }
 
-abstract object Host "http-host" {
+template Host "http-host" {
   services = {
     "ping4", "http"
   },
index e5796df302cf6aa506e9cdd38e8c8b8b2cc3b568..655e750aa48d9abb78dd6db202201a8ba5b3dbde 100644 (file)
@@ -76,7 +76,7 @@ local object Component "compatido" {
  * This template defines some basic parameters for services that use
  * external plugins for their checks.
  */
-abstract object Service "icinga-service" {
+template Service "icinga-service" {
   methods = {
     check = "PluginCheck"
   }
@@ -90,7 +90,7 @@ abstract object Service "icinga-service" {
 /**
  * ping
  */
-abstract object Service "ping4" inherits "icinga-service" {
+template Service "ping4" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -103,7 +103,7 @@ abstract object Service "ping4" inherits "icinga-service" {
 /**
  * ping6
  */
-abstract object Service "ping6" inherits "icinga-service" {
+template Service "ping6" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -116,21 +116,21 @@ abstract object Service "ping6" inherits "icinga-service" {
 /**
  * http
  */
-abstract object Service "http" inherits "icinga-service" {
+template Service "http" inherits "icinga-service" {
   check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
 }
 
 /**
  * ssh
  */
-abstract object Service "ssh" inherits "icinga-service" {
+template Service "ssh" inherits "icinga-service" {
   check_command = "$plugindir$/check_ssh '$address$'",
 }
 
 /**
  * local checks
  */
-abstract object Service "disk space" inherits "icinga-service" {
+template Service "disk space" inherits "icinga-service" {
   check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
   macros += {
     wfree = "20%",
@@ -138,7 +138,7 @@ abstract object Service "disk space" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current users" inherits "icinga-service" {
+template Service "current users" inherits "icinga-service" {
   check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 20,
@@ -146,7 +146,7 @@ abstract object Service "current users" inherits "icinga-service" {
   }
 }
 
-abstract object Service "total processes" inherits "icinga-service" {
+template Service "total processes" inherits "icinga-service" {
   check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 250,
@@ -154,7 +154,7 @@ abstract object Service "total processes" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current load" inherits "icinga-service" {
+template Service "current load" inherits "icinga-service" {
   check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
   macros += {
     wload1 = 5.0,
@@ -169,7 +169,7 @@ abstract object Service "current load" inherits "icinga-service" {
 /**
  * demo check
  */
-abstract object Service "demo" inherits "icinga-service" {
+template Service "demo" inherits "icinga-service" {
   check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
 }
 
index 0bd22f1df4a1dd47802cd7f949f9e4b44d99e50b..c6922c56e7d16069c8049d82da55cc71aea76d3a 100644 (file)
@@ -76,7 +76,7 @@ local object Component "compatido" {
  * This template defines some basic parameters for services that use
  * external plugins for their checks.
  */
-abstract object Service "icinga-service" {
+template Service "icinga-service" {
   methods = {
     check = "PluginCheck"
   }
@@ -90,7 +90,7 @@ abstract object Service "icinga-service" {
 /**
  * ping
  */
-abstract object Service "ping4" inherits "icinga-service" {
+template Service "ping4" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -103,7 +103,7 @@ abstract object Service "ping4" inherits "icinga-service" {
 /**
  * ping6
  */
-abstract object Service "ping6" inherits "icinga-service" {
+template Service "ping6" inherits "icinga-service" {
   check_command = "$plugindir$/check_ping -6 -H $address6$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
   macros += {
     wrta = 50,
@@ -116,21 +116,21 @@ abstract object Service "ping6" inherits "icinga-service" {
 /**
  * http
  */
-abstract object Service "http" inherits "icinga-service" {
+template Service "http" inherits "icinga-service" {
   check_command = "$plugindir$/check_http -H '$address$' -I '$address$'",
 }
 
 /**
  * ssh
  */
-abstract object Service "ssh" inherits "icinga-service" {
+template Service "ssh" inherits "icinga-service" {
   check_command = "$plugindir$/check_ssh '$address$'",
 }
 
 /**
  * local checks
  */
-abstract object Service "disk space" inherits "icinga-service" {
+template Service "disk space" inherits "icinga-service" {
   check_command = "$plugindir$/check_disk -w '$wfree$' -c '$cfree$'",
   macros += {
     wfree = "20%",
@@ -138,7 +138,7 @@ abstract object Service "disk space" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current users" inherits "icinga-service" {
+template Service "current users" inherits "icinga-service" {
   check_command = "$plugindir$/check_users -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 20,
@@ -146,7 +146,7 @@ abstract object Service "current users" inherits "icinga-service" {
   }
 }
 
-abstract object Service "total processes" inherits "icinga-service" {
+template Service "total processes" inherits "icinga-service" {
   check_command = "$plugindir$/check_procs -w '$wgreater$' -c '$cgreater$'",
   macros += {
     wgreater = 250,
@@ -154,7 +154,7 @@ abstract object Service "total processes" inherits "icinga-service" {
   }
 }
 
-abstract object Service "current load" inherits "icinga-service" {
+template Service "current load" inherits "icinga-service" {
   check_command = "$plugindir$/check_load --warning='$wload1$,$wload5$,$wload15$' --critical='$cload1$,$cload5$,$cload15$'",
   macros += {
     wload1 = 5.0,
@@ -169,7 +169,7 @@ abstract object Service "current load" inherits "icinga-service" {
 /**
  * demo check
  */
-abstract object Service "demo" inherits "icinga-service" {
+template Service "demo" inherits "icinga-service" {
   check_command = "$plugindir$/check_dummy 1 'icinga2 yummy!'",
 }
 
index b22499d40e9af837c3aaf528aa2d536629d03ec7..46474521515fbe98ccf3415683b558c73d4a8cda 100644 (file)
@@ -1,4 +1,4 @@
-abstract object Host "http-bench" {
+template Host "http-bench" {
   services = { 
     demo1 = {
       service = "demo"
index 318df23a24be93c7997edfdeffcfb71b21a83766..029bf9cdf6a89a5eb4671675f6bc0bfea9a820e1 100644 (file)
@@ -238,6 +238,15 @@ Specifier "abstract"
 This specifier identifies the object as a template which can be used by other
 object definitions. The object will not be instantiated on its own.
 
+Instead of using the "abstract" specifier you can use the "template" keyword
+which is a shorthand for writing "abstract object":
+
+-------------------------------------------------------------------------------
+template Service "http" {
+  ...
+}
+-------------------------------------------------------------------------------
+
 Specifier "local"
 ^^^^^^^^^^^^^^^^^
 
index 7df7f8aa958a84ef02a83163b558b34e0536756a..a97c65e45c4e7407b07746ffee62dca48922ce23 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-abstract object Notification "plugin-notification" {
+template Notification "plugin-notification" {
        methods = {
                notify = "PluginNotification"
        }
index fb70f916ab5f91635a3f621ca27e172d0e93e8c4..1baa94df8a09d8d0ca933aa012d9061262b6abeb 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
  
-abstract object Service "ping4" inherits "plugin-service" {
+template Service "ping4" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_ping",
                "-4",
@@ -40,7 +40,7 @@ abstract object Service "ping4" inherits "plugin-service" {
        }
 }
 
-abstract object Service "ping6" inherits "plugin-service" {
+template Service "ping6" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_ping",
                "-6",
@@ -63,7 +63,7 @@ abstract object Service "ping6" inherits "plugin-service" {
        }
 }
 
-abstract object Service "dummy" inherits "plugin-service" {
+template Service "dummy" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_dummy",
                "$state$",
@@ -76,28 +76,28 @@ abstract object Service "dummy" inherits "plugin-service" {
        }
 }
 
-abstract object Service "http_vhost" inherits "plugin-service" {
+template Service "http_vhost" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_http",
                "-H", "$vhost$"
        },
 }
 
-abstract object Service "http_ip" inherits "plugin-service" {
+template Service "http_ip" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_http",
                "-I", "$address$"
        }
 }
 
-abstract object Service "ssh" inherits "plugin-service" {
+template Service "ssh" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_ssh",
                "$address$"
        }
 }
 
-abstract object Service "disk" inherits "plugin-service" {
+template Service "disk" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_disk",
                "-w", "$wfree$",
@@ -110,7 +110,7 @@ abstract object Service "disk" inherits "plugin-service" {
        }
 }
 
-abstract object Service "users" inherits "plugin-service" {
+template Service "users" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_users",
                "-w", "$wgreater$",
@@ -123,7 +123,7 @@ abstract object Service "users" inherits "plugin-service" {
   }
 }
 
-abstract object Service "processes" inherits "plugin-service" {
+template Service "processes" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_procs",
                "-w", "$wgreater$",
@@ -137,7 +137,7 @@ abstract object Service "processes" inherits "plugin-service" {
 }
 
 
-abstract object Service "load" inherits "plugin-service" {
+template Service "load" inherits "plugin-service" {
        check_command = {
                "$plugindir$/check_load",
                "-w", "$wload1$,$wload5$,$wload15$",
index b75de064612e96c5d883745de4eaa28a68378635..1bbbe45f22ecc492e41295ad5052d34b11520e99 100644 (file)
@@ -21,17 +21,17 @@ object ServiceGroup "all-services" {
     alias = "All Services"
 }
 
-abstract object Service "itl-service" {
+template Service "itl-service" {
     servicegroups = { "all-services" }
 }
 
-abstract object Service "null-service" inherits "itl-service" {
+template Service "null-service" inherits "itl-service" {
        methods = {
                check = "NullCheck"
        }
 }
 
-abstract object Service "plugin-service" inherits "itl-service" {
+template Service "plugin-service" inherits "itl-service" {
        methods = {
                check = "PluginCheck"
        }
index 1b0a84e66455b9dadfdd1653c097454180bca54f..9f0a00cb12f9bbc822aa15b7665470193591f201 100644 (file)
@@ -370,8 +370,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
        *yy_cp = '\0'; \
        yyg->yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 40
-#define YY_END_OF_BUFFER 41
+#define YY_NUM_RULES 41
+#define YY_END_OF_BUFFER 42
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -379,25 +379,26 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static yyconst flex_int16_t yy_accept[161] =
+static yyconst flex_int16_t yy_accept[168] =
     {   0,
-        0,    0,    0,    0,   41,   39,   38,   38,   39,   39,
-       39,   20,   39,   39,   39,   27,   39,   28,   20,   20,
-       20,   20,   20,   20,   20,   20,   20,   20,   20,   35,
-       36,   38,    0,   21,    0,    0,    0,    0,    0,   20,
-       31,   29,   27,   30,   33,    0,   32,    0,   24,   25,
-       26,    0,   22,   20,   20,   20,   20,   20,   20,   20,
-       20,   20,   20,   20,   20,   20,   35,   34,    0,    0,
-        0,    0,    0,   37,   27,   23,   20,    6,   20,   20,
-       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
-        0,    0,    0,    0,    0,   20,   20,   20,   20,   20,
-
-       16,   20,   20,   20,   20,   20,   18,    1,    0,    0,
-        0,    0,    0,   20,   20,   19,   20,   11,   20,   20,
-       20,   20,   20,    0,    0,    0,    0,    0,   20,   20,
-       20,    3,   12,   20,    5,    4,    0,    0,    0,    0,
-        0,   20,   20,   20,   17,   13,   14,    0,    8,    0,
-       10,   20,   15,    0,    0,   20,    9,    7,    2,    0
+        0,    0,    0,    0,   42,   40,   39,   39,   40,   40,
+       40,   21,   40,   40,   40,   28,   40,   29,   21,   21,
+       21,   21,   21,   21,   21,   21,   21,   21,   21,   36,
+       37,   39,    0,   22,    0,    0,    0,    0,    0,   21,
+       32,   30,   28,   31,   34,    0,   33,    0,   25,   26,
+       27,    0,   23,   21,   21,   21,   21,   21,   21,   21,
+       21,   21,   21,   21,   21,   21,   21,   36,   35,    0,
+        0,    0,    0,    0,   38,   28,   24,   21,    6,   21,
+       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
+       21,   21,    0,    0,    0,    0,    0,   21,   21,   21,
+
+       21,   21,   17,   21,   21,   21,   21,   21,   21,   19,
+        1,    0,    0,    0,    0,    0,   21,   21,   20,   21,
+       11,   21,   21,   21,   21,   21,   21,    0,    0,    0,
+        0,    0,   21,   21,   21,    3,   12,   21,    5,    4,
+       21,    0,    0,    0,    0,    0,   21,   21,   21,   18,
+       21,   14,   15,    0,    8,    0,   10,   21,   16,   13,
+        0,    0,   21,    9,    7,    2,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -440,136 +441,140 @@ static yyconst flex_int32_t yy_meta[40] =
         4,    4,    4,    4,    4,    4,    4,    4,    4
     } ;
 
-static yyconst flex_int16_t yy_base[167] =
+static yyconst flex_int16_t yy_base[174] =
     {   0,
-        0,    0,  274,  273,  279,  282,   38,   40,  274,   18,
-       27,  262,  261,   35,   41,   39,  259,  282,  259,   39,
+        0,    0,  288,  287,  293,  296,   38,   40,  288,   18,
+       27,  276,  275,   35,   41,   39,  273,  296,  273,   39,
        40,   42,   47,   44,   48,   52,   55,   61,   57,    0,
-      262,   76,  268,  282,  241,  244,  233,  246,  249,  251,
-      282,  282,   70,  282,  282,    0,  282,  253,  282,  229,
-      282,  247,  282,   68,   69,   72,   73,   75,   74,   78,
-       71,   87,   94,   89,   95,   96,    0,  282,  242,  242,
-      224,  226,  230,    0,  101,  282,   99,  242,  101,  103,
-      100,  102,  112,  110,  109,  118,  119,  124,  126,  127,
-      228,  221,  220,  216,  226,  128,  129,  130,  131,  136,
-
-      236,  138,  141,  142,  148,  143,  235,  234,  211,  229,
-      220,  219,  223,  152,  144,  228,  154,  227,  156,  157,
-      159,  161,  163,  220,  206,  220,  202,  215,  164,  166,
-      167,  200,  199,  170,  198,  197,  189,  170,  170,  184,
-      169,  168,  171,  173,  187,  282,  282,  165,  282,  169,
-      184,  176,  182,  172,   85,  177,  282,  282,   38,  282,
-      216,  220,  222,  226,  230,  234
+      276,   80,  282,  296,  255,  258,  247,  260,  263,  265,
+      296,  296,   74,  296,  296,    0,  296,  267,  296,  243,
+      296,  261,  296,   63,   65,   72,   73,   75,   74,   78,
+       87,   90,   93,   95,   97,   80,   98,    0,  296,  256,
+      256,  238,  240,  244,    0,  103,  296,  101,  256,  103,
+      105,  112,  104,  108,  106,  120,  116,  118,  128,  126,
+      129,  133,  242,  235,  234,  230,  240,  130,  134,  135,
+
+      132,  141,  250,  146,  147,  144,  156,  148,  157,  249,
+      248,  225,  243,  234,  233,  237,  158,  150,  242,  160,
+      241,  162,  164,  165,  167,  169,  172,  234,  220,  232,
+      214,  212,  174,  173,  176,  214,  213,  177,  212,  211,
+      180,  203,  184,  185,  199,  184,  182,  184,  189,  204,
+      191,  296,  296,  179,  296,  183,  196,  183,  195,  194,
+      186,  119,  192,  296,  296,   38,  296,  231,  235,  237,
+      241,  245,  249
     } ;
 
-static yyconst flex_int16_t yy_def[167] =
+static yyconst flex_int16_t yy_def[174] =
     {   0,
-      160,    1,  161,  161,  160,  160,  160,  160,  162,  160,
-      160,  163,  160,  160,  160,  160,  164,  160,  163,  163,
-      163,  163,  163,  163,  163,  163,  163,  163,  163,  165,
-      160,  160,  162,  160,  160,  160,  160,  160,  160,  163,
-      160,  160,  160,  160,  160,  166,  160,  160,  160,  160,
-      160,  164,  160,  163,  163,  163,  163,  163,  163,  163,
-      163,  163,  163,  163,  163,  163,  165,  160,  160,  160,
-      160,  160,  160,  166,  160,  160,  163,  163,  163,  163,
-      163,  163,  163,  163,  163,  163,  163,  163,  163,  163,
-      160,  160,  160,  160,  160,  163,  163,  163,  163,  163,
-
-      163,  163,  163,  163,  163,  163,  163,  163,  160,  160,
-      160,  160,  160,  163,  163,  163,  163,  163,  163,  163,
-      163,  163,  163,  160,  160,  160,  160,  160,  163,  163,
-      163,  163,  163,  163,  163,  163,  160,  160,  160,  160,
-      160,  163,  163,  163,  163,  160,  160,  160,  160,  160,
-      163,  163,  163,  160,  160,  163,  160,  160,  163,    0,
-      160,  160,  160,  160,  160,  160
+      167,    1,  168,  168,  167,  167,  167,  167,  169,  167,
+      167,  170,  167,  167,  167,  167,  171,  167,  170,  170,
+      170,  170,  170,  170,  170,  170,  170,  170,  170,  172,
+      167,  167,  169,  167,  167,  167,  167,  167,  167,  170,
+      167,  167,  167,  167,  167,  173,  167,  167,  167,  167,
+      167,  171,  167,  170,  170,  170,  170,  170,  170,  170,
+      170,  170,  170,  170,  170,  170,  170,  172,  167,  167,
+      167,  167,  167,  167,  173,  167,  167,  170,  170,  170,
+      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
+      170,  170,  167,  167,  167,  167,  167,  170,  170,  170,
+
+      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
+      170,  167,  167,  167,  167,  167,  170,  170,  170,  170,
+      170,  170,  170,  170,  170,  170,  170,  167,  167,  167,
+      167,  167,  170,  170,  170,  170,  170,  170,  170,  170,
+      170,  167,  167,  167,  167,  167,  170,  170,  170,  170,
+      170,  167,  167,  167,  167,  167,  170,  170,  170,  170,
+      167,  167,  170,  167,  167,  170,    0,  167,  167,  167,
+      167,  167,  167
     } ;
 
-static yyconst flex_int16_t yy_nxt[322] =
+static yyconst flex_int16_t yy_nxt[336] =
     {   0,
         6,    7,    8,    9,   10,   11,   12,   13,   14,    6,
        15,   16,    6,   17,   18,    6,   19,   20,   19,   19,
        21,   19,   22,   19,   19,   23,   19,   24,   19,   25,
        26,   27,   19,   19,   28,   29,   19,   19,   19,   32,
        32,   32,   32,   35,   37,   36,   43,   45,   48,   44,
-       43,   46,  160,  160,  160,   47,  160,   54,  160,   57,
-       38,  160,  160,   49,   39,   56,  160,   50,   55,  160,
-       61,  160,   62,   51,   59,  160,   58,   32,   32,   48,
-       63,   43,  160,  160,   60,  160,  160,  160,  160,  160,
-       65,   79,  160,   82,   49,   66,   64,   85,   50,   81,
-
-       80,  160,   77,  160,   51,   83,   84,   78,  160,  160,
-      160,   87,   75,  160,  160,  160,  160,  160,  158,  100,
-       86,   99,   88,  160,  160,   49,  160,   90,  102,   50,
-      103,   89,  160,  160,   96,   51,   97,   98,  160,  101,
-      160,  160,  160,  160,  160,  160,  105,  107,  108,  106,
-      160,  116,  160,  104,  115,  160,  160,  160,  160,  119,
-      120,  114,  160,  118,  117,  122,  160,  121,  160,  129,
-      160,  160,  123,  160,  130,  160,  134,  160,  160,  131,
-      160,  160,  160,  142,  160,  160,  136,  160,  152,  132,
-      160,  160,  133,  157,  135,  143,  160,  145,  160,  155,
-
-      154,  160,  144,  151,  150,  149,  148,  153,  147,  156,
-      146,  160,  160,  160,  160,  159,   30,   30,   30,   30,
-       33,   33,   33,   33,   40,   40,   52,   52,   52,   52,
-       67,   67,  141,   67,   74,  140,   74,   74,  139,  138,
-      137,  160,  160,  128,  127,  126,  125,  124,  160,  160,
-      160,  113,  112,  111,  110,  109,  160,   95,   94,   93,
-       92,   91,   53,   76,   75,  160,   73,   72,   71,   70,
-       69,   34,   68,  160,   53,   42,   41,   34,  160,   31,
-       31,    5,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160
+       43,   46,  167,  167,  167,   47,  167,   54,  167,   57,
+       38,  167,  167,   49,   39,   56,  167,   50,   55,  167,
+       61,  167,   62,   51,   59,  167,   58,  167,   65,  167,
+       63,   32,   32,   48,   60,   43,  167,  167,  167,  167,
+       66,   80,  167,   83,  167,   67,   64,   78,   49,   82,
+
+       81,  167,   50,   79,  167,   84,   85,  167,   51,  167,
+       88,  167,  167,   86,   76,  167,   91,  167,  167,  167,
+      167,  102,  167,   87,  104,   90,  167,   49,   89,   92,
+      167,   50,  167,  101,  167,  103,   98,   51,   99,  100,
+      167,  105,  167,  167,  167,  107,  167,  167,  167,  167,
+      110,  106,  165,  108,  111,  167,  119,  109,  167,  118,
+      167,  167,  167,  117,  167,  120,  123,  122,  121,  124,
+      167,  167,  167,  125,  167,  133,  167,  126,  167,  167,
+      134,  167,  138,  167,  127,  135,  167,  167,  167,  141,
+      167,  167,  140,  147,  167,  136,  167,  167,  167,  137,
+
+      139,  158,  148,  167,  150,  167,  167,  164,  167,  167,
+      167,  149,  160,  162,  161,  151,  163,  157,  167,  156,
+      155,  154,  153,  159,  152,  167,  167,  167,  167,  146,
+      166,   30,   30,   30,   30,   33,   33,   33,   33,   40,
+       40,   52,   52,   52,   52,   68,   68,  145,   68,   75,
+      144,   75,   75,  143,  142,  167,  167,  132,  131,  130,
+      129,  128,  167,  167,  167,  116,  115,  114,  113,  112,
+      167,   97,   96,   95,   94,   93,   53,   77,   76,  167,
+       74,   73,   72,   71,   70,   34,   69,  167,   53,   42,
+       41,   34,  167,   31,   31,    5,  167,  167,  167,  167,
+
+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
+      167,  167,  167,  167,  167
     } ;
 
-static yyconst flex_int16_t yy_chk[322] =
+static yyconst flex_int16_t yy_chk[336] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    7,
         7,    8,    8,   10,   11,   10,   14,   15,   16,   14,
-       16,   15,  159,   20,   21,   15,   22,   20,   24,   22,
+       16,   15,  166,   20,   21,   15,   22,   20,   24,   22,
        11,   23,   25,   16,   11,   21,   26,   16,   20,   27,
-       26,   29,   27,   16,   24,   28,   23,   32,   32,   43,
-       28,   43,   54,   55,   25,   61,   56,   57,   59,   58,
-       29,   56,   60,   59,   43,   29,   28,   61,   43,   58,
-
-       57,   62,   54,   64,   43,   60,   60,   55,   63,   65,
-       66,   63,   75,   77,   81,   79,   82,   80,  155,   82,
-       62,   81,   64,   85,   84,   75,   83,   66,   84,   75,
-       85,   65,   86,   87,   77,   75,   79,   80,   88,   83,
-       89,   90,   96,   97,   98,   99,   87,   89,   90,   88,
-      100,   98,  102,   86,   97,  103,  104,  106,  115,  102,
-      103,   96,  105,  100,   99,  105,  114,  104,  117,  114,
-      119,  120,  106,  121,  115,  122,  121,  123,  129,  117,
-      130,  131,  142,  129,  134,  143,  123,  144,  143,  119,
-      152,  156,  120,  154,  122,  130,  153,  134,  151,  150,
-
-      148,  145,  131,  142,  141,  140,  139,  144,  138,  152,
-      137,  136,  135,  133,  132,  156,  161,  161,  161,  161,
-      162,  162,  162,  162,  163,  163,  164,  164,  164,  164,
-      165,  165,  128,  165,  166,  127,  166,  166,  126,  125,
-      124,  118,  116,  113,  112,  111,  110,  109,  108,  107,
-      101,   95,   94,   93,   92,   91,   78,   73,   72,   71,
-       70,   69,   52,   50,   48,   40,   39,   38,   37,   36,
-       35,   33,   31,   19,   17,   13,   12,    9,    5,    4,
-        3,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160
+       26,   29,   27,   16,   24,   28,   23,   54,   29,   55,
+       28,   32,   32,   43,   25,   43,   56,   57,   59,   58,
+       29,   56,   60,   59,   66,   29,   28,   54,   43,   58,
+
+       57,   61,   43,   55,   62,   60,   60,   63,   43,   64,
+       63,   65,   67,   61,   76,   78,   66,   80,   83,   81,
+       85,   83,   84,   62,   85,   65,   82,   76,   64,   67,
+       87,   76,   88,   82,   86,   84,   78,   76,   80,   81,
+       90,   86,   89,   91,   98,   88,  101,   92,   99,  100,
+       91,   87,  162,   89,   92,  102,  100,   90,  106,   99,
+      104,  105,  108,   98,  118,  101,  105,  104,  102,  106,
+      107,  109,  117,  107,  120,  117,  122,  108,  123,  124,
+      118,  125,  124,  126,  109,  120,  127,  134,  133,  127,
+      135,  138,  126,  133,  141,  122,  147,  158,  148,  123,
+
+      125,  148,  134,  149,  138,  151,  163,  161,  160,  159,
+      157,  135,  151,  156,  154,  141,  158,  147,  150,  146,
+      145,  144,  143,  149,  142,  140,  139,  137,  136,  132,
+      163,  168,  168,  168,  168,  169,  169,  169,  169,  170,
+      170,  171,  171,  171,  171,  172,  172,  131,  172,  173,
+      130,  173,  173,  129,  128,  121,  119,  116,  115,  114,
+      113,  112,  111,  110,  103,   97,   96,   95,   94,   93,
+       79,   74,   73,   72,   71,   70,   52,   50,   48,   40,
+       39,   38,   37,   36,   35,   33,   31,   19,   17,   13,
+       12,    9,    5,    4,    3,  167,  167,  167,  167,  167,
+
+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
+      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
+      167,  167,  167,  167,  167
     } ;
 
 /* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[41] =
+static yyconst flex_int32_t yy_rule_can_match_eol[42] =
     {   0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0
-    0,     };
+    0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1
+    0, 0,     };
 
 /* The intent behind this definition is that it'll catch
  * any uses of REJECT which flex missed.
@@ -621,7 +626,7 @@ do {                                                        \
 } while (0)
 #define YY_NO_UNISTD_H 1
 
-#line 625 "config_lexer.cc"
+#line 630 "config_lexer.cc"
 
 #define INITIAL 0
 #define IN_C_COMMENT 1
@@ -870,7 +875,7 @@ YY_DECL
 
 #line 49 "config_lexer.ll"
 
-#line 874 "config_lexer.cc"
+#line 879 "config_lexer.cc"
 
     yylval = yylval_param;
 
@@ -927,13 +932,13 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 161 )
+                               if ( yy_current_state >= 168 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
-               while ( yy_current_state != 160 );
+               while ( yy_current_state != 167 );
                yy_cp = yyg->yy_last_accepting_cpos;
                yy_current_state = yyg->yy_last_accepting_state;
 
@@ -1028,74 +1033,74 @@ return T_OBJECT;
 case 13:
 YY_RULE_SETUP
 #line 62 "config_lexer.ll"
-return T_INCLUDE;
+return T_TEMPLATE;
        YY_BREAK
 case 14:
 YY_RULE_SETUP
 #line 63 "config_lexer.ll"
-return T_LIBRARY;
+return T_INCLUDE;
        YY_BREAK
 case 15:
 YY_RULE_SETUP
 #line 64 "config_lexer.ll"
-return T_INHERITS;
+return T_LIBRARY;
        YY_BREAK
 case 16:
 YY_RULE_SETUP
 #line 65 "config_lexer.ll"
-return T_NULL;
+return T_INHERITS;
        YY_BREAK
 case 17:
 YY_RULE_SETUP
 #line 66 "config_lexer.ll"
-return T_PARTIAL;
+return T_NULL;
        YY_BREAK
 case 18:
 YY_RULE_SETUP
 #line 67 "config_lexer.ll"
-{ yylval->num = 1; return T_NUMBER; }
+return T_PARTIAL;
        YY_BREAK
 case 19:
 YY_RULE_SETUP
 #line 68 "config_lexer.ll"
-{ yylval->num = 0; return T_NUMBER; }
+{ yylval->num = 1; return T_NUMBER; }
        YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 69 "config_lexer.ll"
-{ yylval->text = strdup(yytext); return T_IDENTIFIER; }
+{ yylval->num = 0; return T_NUMBER; }
        YY_BREAK
 case 21:
-/* rule 21 can match eol */
 YY_RULE_SETUP
 #line 70 "config_lexer.ll"
-{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING; }
+{ yylval->text = strdup(yytext); return T_IDENTIFIER; }
        YY_BREAK
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
 #line 71 "config_lexer.ll"
-{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING_ANGLE; }
+{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING; }
        YY_BREAK
 case 23:
+/* rule 23 can match eol */
 YY_RULE_SETUP
 #line 72 "config_lexer.ll"
-{ yylval->num = strtod(yytext, NULL) / 1000; return T_NUMBER; }
+{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING_ANGLE; }
        YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 73 "config_lexer.ll"
-{ yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; }
+{ yylval->num = strtod(yytext, NULL) / 1000; return T_NUMBER; }
        YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 74 "config_lexer.ll"
-{ yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; }
+{ yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; }
        YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 75 "config_lexer.ll"
-{ yylval->num = strtod(yytext, NULL); return T_NUMBER; }
+{ yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; }
        YY_BREAK
 case 27:
 YY_RULE_SETUP
@@ -1105,75 +1110,80 @@ YY_RULE_SETUP
 case 28:
 YY_RULE_SETUP
 #line 77 "config_lexer.ll"
-{ yylval->op = OperatorSet; return T_EQUAL; }
+{ yylval->num = strtod(yytext, NULL); return T_NUMBER; }
        YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 78 "config_lexer.ll"
-{ yylval->op = OperatorPlus; return T_PLUS_EQUAL; }
+{ yylval->op = OperatorSet; return T_EQUAL; }
        YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 79 "config_lexer.ll"
-{ yylval->op = OperatorMinus; return T_MINUS_EQUAL; }
+{ yylval->op = OperatorPlus; return T_PLUS_EQUAL; }
        YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 80 "config_lexer.ll"
-{ yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; }
+{ yylval->op = OperatorMinus; return T_MINUS_EQUAL; }
        YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 81 "config_lexer.ll"
-{ yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; }
+{ yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; }
        YY_BREAK
-
 case 33:
 YY_RULE_SETUP
-#line 84 "config_lexer.ll"
-BEGIN(IN_C_COMMENT);
+#line 82 "config_lexer.ll"
+{ yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; }
        YY_BREAK
 
-
 case 34:
 YY_RULE_SETUP
-#line 88 "config_lexer.ll"
-BEGIN(INITIAL);
+#line 85 "config_lexer.ll"
+BEGIN(IN_C_COMMENT);
        YY_BREAK
+
+
 case 35:
-/* rule 35 can match eol */
 YY_RULE_SETUP
 #line 89 "config_lexer.ll"
-/* ignore comment */
+BEGIN(INITIAL);
        YY_BREAK
 case 36:
+/* rule 36 can match eol */
 YY_RULE_SETUP
 #line 90 "config_lexer.ll"
-/* ignore star */
+/* ignore comment */
        YY_BREAK
-
 case 37:
 YY_RULE_SETUP
-#line 93 "config_lexer.ll"
-/* ignore C++-style comments */
+#line 91 "config_lexer.ll"
+/* ignore star */
        YY_BREAK
+
 case 38:
-/* rule 38 can match eol */
 YY_RULE_SETUP
 #line 94 "config_lexer.ll"
-/* ignore whitespace */
+/* ignore C++-style comments */
        YY_BREAK
 case 39:
+/* rule 39 can match eol */
 YY_RULE_SETUP
-#line 96 "config_lexer.ll"
-return yytext[0];
+#line 95 "config_lexer.ll"
+/* ignore whitespace */
        YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 97 "config_lexer.ll"
+return yytext[0];
+       YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 98 "config_lexer.ll"
 ECHO;
        YY_BREAK
-#line 1177 "config_lexer.cc"
+#line 1187 "config_lexer.cc"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(IN_C_COMMENT):
        yyterminate();
@@ -1469,7 +1479,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 161 )
+                       if ( yy_current_state >= 168 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1498,11 +1508,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 161 )
+               if ( yy_current_state >= 168 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-       yy_is_jam = (yy_current_state == 160);
+       yy_is_jam = (yy_current_state == 167);
 
        return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2361,7 +2371,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
 
 #define YYTABLES_NAME "yytables"
 
-#line 97 "config_lexer.ll"
+#line 98 "config_lexer.ll"
 
 
 
@@ -2377,4 +2387,3 @@ void ConfigCompiler::DestroyScanner(void)
        yylex_destroy(m_Scanner);
 }
 
-
index 6a72178fd84bf80611eccfc8be57ecd343dd32cd..9cb3eaa4d3d7c319288d28f7f0e0ba6117f3363a 100644 (file)
@@ -59,6 +59,7 @@ any                           { yylval->type = TypeAny; return T_TYPE_ANY; }
 abstract                       return T_ABSTRACT;
 local                          return T_LOCAL;
 object                         return T_OBJECT;
+template                       return T_TEMPLATE;
 #include                       return T_INCLUDE;
 #library                       return T_LIBRARY;
 inherits                       return T_INHERITS;
@@ -107,4 +108,3 @@ void ConfigCompiler::DestroyScanner(void)
 {
        yylex_destroy(m_Scanner);
 }
-
index d0254662c286041167b0b443adf970474bdbbe24..aa63238f304b680b30b5dfd5374217450d27e313 100644 (file)
@@ -1,8 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Bison implementation for Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    
    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
@@ -44,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.5"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -66,8 +68,8 @@
 /* Copy the first part of user declarations.  */
 
 
-/* Line 268 of yacc.c  */
-#line 71 "config_parser.cc"
+/* Line 189 of yacc.c  */
+#line 73 "config_parser.cc"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -89,7 +91,7 @@
 
 /* "%code requires" blocks.  */
 
-/* Line 288 of yacc.c  */
+/* Line 209 of yacc.c  */
 #line 1 "config_parser.yy"
 
 /******************************************************************************
@@ -120,8 +122,8 @@ using namespace icinga;
 
 
 
-/* Line 288 of yacc.c  */
-#line 125 "config_parser.cc"
+/* Line 209 of yacc.c  */
+#line 127 "config_parser.cc"
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -151,10 +153,11 @@ using namespace icinga;
      T_ABSTRACT = 277,
      T_LOCAL = 278,
      T_OBJECT = 279,
-     T_INCLUDE = 280,
-     T_LIBRARY = 281,
-     T_INHERITS = 282,
-     T_PARTIAL = 283
+     T_TEMPLATE = 280,
+     T_INCLUDE = 281,
+     T_LIBRARY = 282,
+     T_INHERITS = 283,
+     T_PARTIAL = 284
    };
 #endif
 /* Tokens.  */
@@ -180,10 +183,11 @@ using namespace icinga;
 #define T_ABSTRACT 277
 #define T_LOCAL 278
 #define T_OBJECT 279
-#define T_INCLUDE 280
-#define T_LIBRARY 281
-#define T_INHERITS 282
-#define T_PARTIAL 283
+#define T_TEMPLATE 280
+#define T_INCLUDE 281
+#define T_LIBRARY 282
+#define T_INHERITS 283
+#define T_PARTIAL 284
 
 
 
@@ -192,7 +196,7 @@ using namespace icinga;
 typedef union YYSTYPE
 {
 
-/* Line 293 of yacc.c  */
+/* Line 214 of yacc.c  */
 #line 38 "config_parser.yy"
 
        char *text;
@@ -203,8 +207,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 293 of yacc.c  */
-#line 208 "config_parser.cc"
+/* Line 214 of yacc.c  */
+#line 212 "config_parser.cc"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -227,8 +231,8 @@ typedef struct YYLTYPE
 
 /* Copy the second part of user declarations.  */
 
-/* Line 343 of yacc.c  */
-#line 82 "config_parser.yy"
+/* Line 264 of yacc.c  */
+#line 83 "config_parser.yy"
 
 
 int yylex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner);
@@ -266,8 +270,8 @@ void ConfigCompiler::Compile(void)
 
 
 
-/* Line 343 of yacc.c  */
-#line 271 "config_parser.cc"
+/* Line 264 of yacc.c  */
+#line 275 "config_parser.cc"
 
 #ifdef short
 # undef short
@@ -317,7 +321,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -370,11 +374,11 @@ YYID (yyi)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef EXIT_SUCCESS
-#      define EXIT_SUCCESS 0
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
 #     endif
 #    endif
 #   endif
@@ -397,24 +401,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
+#  if (defined __cplusplus && ! defined _STDLIB_H \
        && ! ((defined YYMALLOC || defined malloc) \
             && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef EXIT_SUCCESS
-#    define EXIT_SUCCESS 0
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -445,7 +449,23 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
       + 2 * YYSTACK_GAP_MAXIMUM)
 
-# define YYCOPY_NEEDED 1
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)             \
+      do                                       \
+       {                                       \
+         YYSIZE_T yyi;                         \
+         for (yyi = 0; yyi < (Count); yyi++)   \
+           (To)[yyi] = (From)[yyi];            \
+       }                                       \
+      while (YYID (0))
+#  endif
+# endif
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -465,43 +485,23 @@ union yyalloc
 
 #endif
 
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)             \
-      do                                       \
-       {                                       \
-         YYSIZE_T yyi;                         \
-         for (yyi = 0; yyi < (Count); yyi++)   \
-           (To)[yyi] = (From)[yyi];            \
-       }                                       \
-      while (YYID (0))
-#  endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  2
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   77
+#define YYLAST   80
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  38
+#define YYNTOKENS  39
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  31
+#define YYNNTS  32
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  66
+#define YYNRULES  68
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  90
+#define YYNSTATES  92
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   283
+#define YYMAXUTOK   284
 
 #define YYTRANSLATE(YYX)                                               \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -513,15 +513,15 @@ static const yytype_uint8 yytranslate[] =
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,    31,    29,    35,    30,     2,    32,     2,     2,
+       2,     2,    32,    30,    36,    31,     2,    33,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    36,     2,    37,     2,     2,     2,     2,     2,     2,
+       2,    37,     2,    38,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    33,     2,    34,     2,     2,     2,     2,
+       2,     2,     2,    34,     2,    35,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -537,7 +537,7 @@ static const yytype_uint8 yytranslate[] =
        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28
+      25,    26,    27,    28,    29
 };
 
 #if YYDEBUG
@@ -548,44 +548,45 @@ static const yytype_uint8 yyprhs[] =
        0,     0,     3,     4,     7,     9,    11,    13,    15,    18,
       21,    24,    26,    28,    29,    36,    37,    39,    40,    45,
       47,    50,    51,    53,    57,    60,    63,    67,    72,    73,
-      76,    78,    80,    82,    84,    86,    87,    88,    97,    98,
-     101,   103,   105,   107,   111,   113,   114,   117,   118,   123,
-     125,   128,   129,   131,   135,   139,   146,   148,   150,   152,
-     154,   156,   158,   160,   162,   164,   166
+      76,    78,    80,    82,    84,    86,    87,    88,    96,    99,
+     101,   102,   105,   107,   109,   111,   115,   117,   118,   121,
+     122,   127,   129,   132,   133,   135,   139,   143,   150,   152,
+     154,   156,   158,   160,   162,   164,   166,   168,   170
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
-      39,     0,    -1,    -1,    39,    40,    -1,    53,    -1,    44,
-      -1,    41,    -1,    42,    -1,    25,     3,    -1,    25,     4,
-      -1,    26,     3,    -1,     7,    -1,     3,    -1,    -1,    46,
-      21,    43,    45,    52,    47,    -1,    -1,    28,    -1,    -1,
-      33,    48,    49,    34,    -1,    50,    -1,    50,    35,    -1,
-      -1,    51,    -1,    50,    35,    51,    -1,    19,     3,    -1,
-      18,     3,    -1,    20,    44,     3,    -1,    20,    44,     3,
-      47,    -1,    -1,    27,     3,    -1,    13,    -1,    14,    -1,
-      15,    -1,    16,    -1,    17,    -1,    -1,    -1,    54,    56,
-      24,    43,     3,    55,    60,    61,    -1,    -1,    56,    57,
-      -1,    22,    -1,    23,    -1,    59,    -1,    58,    35,    59,
-      -1,     3,    -1,    -1,    27,    58,    -1,    -1,    33,    62,
-      63,    34,    -1,    64,    -1,    64,    35,    -1,    -1,    65,
-      -1,    64,    35,    65,    -1,    43,    66,    68,    -1,    43,
-      36,     3,    37,    66,    68,    -1,    68,    -1,     8,    -1,
-       9,    -1,    10,    -1,    11,    -1,    12,    -1,     3,    -1,
-       5,    -1,     6,    -1,    67,    -1,    61,    -1
+      40,     0,    -1,    -1,    40,    41,    -1,    54,    -1,    45,
+      -1,    42,    -1,    43,    -1,    26,     3,    -1,    26,     4,
+      -1,    27,     3,    -1,     7,    -1,     3,    -1,    -1,    47,
+      21,    44,    46,    53,    48,    -1,    -1,    29,    -1,    -1,
+      34,    49,    50,    35,    -1,    51,    -1,    51,    36,    -1,
+      -1,    52,    -1,    51,    36,    52,    -1,    19,     3,    -1,
+      18,     3,    -1,    20,    45,     3,    -1,    20,    45,     3,
+      48,    -1,    -1,    28,     3,    -1,    13,    -1,    14,    -1,
+      15,    -1,    16,    -1,    17,    -1,    -1,    -1,    55,    57,
+      44,     3,    56,    62,    63,    -1,    58,    24,    -1,    25,
+      -1,    -1,    58,    59,    -1,    22,    -1,    23,    -1,    61,
+      -1,    60,    36,    61,    -1,     3,    -1,    -1,    28,    60,
+      -1,    -1,    34,    64,    65,    35,    -1,    66,    -1,    66,
+      36,    -1,    -1,    67,    -1,    66,    36,    67,    -1,    44,
+      68,    70,    -1,    44,    37,     3,    38,    68,    70,    -1,
+      70,    -1,     8,    -1,     9,    -1,    10,    -1,    11,    -1,
+      12,    -1,     3,    -1,     5,    -1,     6,    -1,    69,    -1,
+      63,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   120,   120,   121,   124,   124,   124,   124,   127,   132,
-     138,   144,   145,   153,   152,   182,   185,   192,   191,   203,
-     204,   206,   207,   208,   211,   216,   221,   228,   237,   238,
-     245,   246,   247,   248,   249,   256,   261,   256,   286,   287,
-     290,   294,   300,   301,   304,   311,   312,   316,   315,   327,
-     328,   330,   331,   332,   335,   343,   357,   366,   367,   368,
-     369,   370,   376,   381,   385,   391,   392
+       0,   121,   121,   122,   125,   125,   125,   125,   128,   133,
+     139,   145,   146,   154,   153,   183,   186,   193,   192,   204,
+     205,   207,   208,   209,   212,   217,   222,   229,   238,   239,
+     246,   247,   248,   249,   250,   257,   262,   257,   287,   288,
+     293,   294,   297,   301,   307,   308,   311,   318,   319,   323,
+     322,   334,   335,   337,   338,   339,   342,   350,   364,   373,
+     374,   375,   376,   377,   383,   388,   392,   398,   399
 };
 #endif
 
@@ -599,15 +600,16 @@ static const char *const yytname[] =
   "T_MULTIPLY_EQUAL", "T_DIVIDE_EQUAL", "T_TYPE_DICTIONARY",
   "T_TYPE_NUMBER", "T_TYPE_STRING", "T_TYPE_SCALAR", "T_TYPE_ANY",
   "T_VALIDATOR", "T_REQUIRE", "T_ATTRIBUTE", "T_TYPE", "T_ABSTRACT",
-  "T_LOCAL", "T_OBJECT", "T_INCLUDE", "T_LIBRARY", "T_INHERITS",
-  "T_PARTIAL", "'+'", "'-'", "'*'", "'/'", "'{'", "'}'", "','", "'['",
-  "']'", "$accept", "statements", "statement", "include", "library",
-  "identifier", "type", "$@1", "partial_specifier", "typerulelist", "$@2",
-  "typerules", "typerules_inner", "typerule", "type_inherits_specifier",
-  "object", "$@3", "$@4", "attributes", "attribute",
-  "object_inherits_list", "object_inherits_item",
-  "object_inherits_specifier", "expressionlist", "$@5", "expressions",
-  "expressions_inner", "expression", "operator", "simplevalue", "value", 0
+  "T_LOCAL", "T_OBJECT", "T_TEMPLATE", "T_INCLUDE", "T_LIBRARY",
+  "T_INHERITS", "T_PARTIAL", "'+'", "'-'", "'*'", "'/'", "'{'", "'}'",
+  "','", "'['", "']'", "$accept", "statements", "statement", "include",
+  "library", "identifier", "type", "$@1", "partial_specifier",
+  "typerulelist", "$@2", "typerules", "typerules_inner", "typerule",
+  "type_inherits_specifier", "object", "$@3", "$@4", "object_declaration",
+  "attributes", "attribute", "object_inherits_list",
+  "object_inherits_item", "object_inherits_specifier", "expressionlist",
+  "$@5", "expressions", "expressions_inner", "expression", "operator",
+  "simplevalue", "value", 0
 };
 #endif
 
@@ -618,21 +620,21 @@ static const yytype_uint16 yytoknum[] =
 {
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,    43,
-      45,    42,    47,   123,   125,    44,    91,    93
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
+      43,    45,    42,    47,   123,   125,    44,    91,    93
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    38,    39,    39,    40,    40,    40,    40,    41,    41,
-      42,    43,    43,    45,    44,    46,    46,    48,    47,    49,
-      49,    50,    50,    50,    51,    51,    51,    51,    52,    52,
-      44,    44,    44,    44,    44,    54,    55,    53,    56,    56,
-      57,    57,    58,    58,    59,    60,    60,    62,    61,    63,
-      63,    64,    64,    64,    65,    65,    65,    66,    66,    66,
-      66,    66,    67,    67,    67,    68,    68
+       0,    39,    40,    40,    41,    41,    41,    41,    42,    42,
+      43,    44,    44,    46,    45,    47,    47,    49,    48,    50,
+      50,    51,    51,    51,    52,    52,    52,    52,    53,    53,
+      45,    45,    45,    45,    45,    55,    56,    54,    57,    57,
+      58,    58,    59,    59,    60,    60,    61,    62,    62,    64,
+      63,    65,    65,    66,    66,    66,    67,    67,    67,    68,
+      68,    68,    68,    68,    69,    69,    69,    70,    70
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -641,109 +643,109 @@ static const yytype_uint8 yyr2[] =
        0,     2,     0,     2,     1,     1,     1,     1,     2,     2,
        2,     1,     1,     0,     6,     0,     1,     0,     4,     1,
        2,     0,     1,     3,     2,     2,     3,     4,     0,     2,
-       1,     1,     1,     1,     1,     0,     0,     8,     0,     2,
-       1,     1,     1,     3,     1,     0,     2,     0,     4,     1,
-       2,     0,     1,     3,     3,     6,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1
+       1,     1,     1,     1,     1,     0,     0,     7,     2,     1,
+       0,     2,     1,     1,     1,     3,     1,     0,     2,     0,
+       4,     1,     2,     0,     1,     3,     3,     6,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1
 };
 
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
-   Performed when YYTABLE doesn't specify something else to do.  Zero
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
        2,    35,     1,    30,    31,    32,    33,    34,     0,     0,
-      16,     3,     6,     7,     5,     0,     4,    38,     8,     9,
-      10,     0,     0,    12,    11,    13,    40,    41,     0,    39,
-      28,     0,     0,     0,    36,    29,    17,    14,    45,    21,
-       0,     0,     0,     0,    15,     0,    19,    22,    44,    46,
-      42,    47,    37,    25,    24,     0,    18,    20,     0,    51,
-      26,    23,    43,    12,    63,    64,     0,    66,     0,    49,
-      52,    65,    56,    27,    57,    58,    59,    60,    61,     0,
-       0,    48,    50,     0,    62,    54,    53,     0,     0,    55
+      16,     3,     6,     7,     5,     0,     4,    40,     8,     9,
+      10,     0,    39,     0,     0,    12,    11,    13,     0,    42,
+      43,    38,    41,    28,    36,     0,     0,    47,    29,    17,
+      14,     0,     0,    21,    46,    48,    44,    49,    37,     0,
+       0,    15,     0,    19,    22,     0,    53,    25,    24,     0,
+      18,    20,    45,    12,    65,    66,     0,    68,     0,    51,
+      54,    67,    58,    26,    23,    59,    60,    61,    62,    63,
+       0,     0,    50,    52,    27,     0,    64,    56,    55,     0,
+       0,    57
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int8 yydefgoto[] =
 {
-      -1,     1,    11,    12,    13,    66,    14,    30,    15,    37,
-      39,    45,    46,    47,    33,    16,    17,    38,    22,    29,
-      49,    50,    41,    67,    59,    68,    69,    70,    80,    71,
-      72
+      -1,     1,    11,    12,    13,    66,    14,    33,    15,    40,
+      43,    52,    53,    54,    36,    16,    17,    37,    23,    24,
+      32,    45,    46,    42,    67,    56,    68,    69,    70,    81,
+      71,    72
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -61
+#define YYPACT_NINF -62
 static const yytype_int8 yypact[] =
 {
-     -61,     1,   -61,   -61,   -61,   -61,   -61,   -61,    30,     3,
-     -61,   -61,   -61,   -61,   -61,     0,   -61,   -61,   -61,   -61,
-     -61,    16,    24,   -61,   -61,   -61,   -61,   -61,    16,   -61,
-      27,    52,    53,    -2,   -61,   -61,   -61,   -61,    32,    31,
-      54,    25,    57,    58,    -4,    29,    34,   -61,   -61,    35,
-     -61,   -61,   -61,   -61,   -61,    59,   -61,    31,    54,    -3,
-      -2,   -61,   -61,    18,   -61,   -61,    28,   -61,    37,    38,
-     -61,   -61,   -61,   -61,   -61,   -61,   -61,   -61,   -61,    62,
-       2,   -61,    -3,    39,   -61,   -61,   -61,    33,     2,   -61
+     -62,     1,   -62,   -62,   -62,   -62,   -62,   -62,    48,    32,
+     -62,   -62,   -62,   -62,   -62,   -15,   -62,    22,   -62,   -62,
+     -62,    16,   -62,    16,    10,   -62,   -62,   -62,    52,   -62,
+     -62,   -62,   -62,    -7,   -62,    53,    23,    31,   -62,   -62,
+     -62,    55,    26,    30,   -62,    25,   -62,   -62,   -62,    59,
+      60,    -4,    33,    28,   -62,    55,    -3,   -62,   -62,    62,
+     -62,    30,   -62,    18,   -62,   -62,    29,   -62,    35,    36,
+     -62,   -62,   -62,    23,   -62,   -62,   -62,   -62,   -62,   -62,
+      64,     2,   -62,    -3,   -62,    37,   -62,   -62,   -62,    34,
+       2,   -62
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
-     -61,   -61,   -61,   -61,   -61,     4,    22,   -61,   -61,     7,
-     -61,   -61,   -61,    11,   -61,   -61,   -61,   -61,   -61,   -61,
-     -61,    14,   -61,    36,   -61,   -61,   -61,    -8,   -12,   -61,
-     -60
+     -62,   -62,   -62,   -62,   -62,     3,    20,   -62,   -62,     0,
+     -62,   -62,   -62,     8,   -62,   -62,   -62,   -62,   -62,   -62,
+     -62,   -62,    19,   -62,    38,   -62,   -62,   -62,    -6,   -13,
+     -62,   -61
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -63
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -65
 static const yytype_int8 yytable[] =
 {
-      63,     2,    64,    65,    24,    84,    20,    64,    65,     3,
-       4,     5,     6,     7,     3,     4,     5,     6,     7,    23,
-      85,    21,   -15,    24,    10,    25,     8,     9,    89,    10,
-      51,    36,    31,    18,    19,    51,    74,    75,    76,    77,
-      78,    74,    75,    76,    77,    78,    26,    27,    28,    42,
-      43,    44,   -62,   -62,    32,    34,    35,    48,    51,    40,
-      53,    54,    60,    56,    79,    83,    55,    73,    61,    57,
-      58,    81,    62,    82,    86,    88,    87,    52
+      63,     2,    64,    65,    26,    86,    21,    64,    65,     3,
+       4,     5,     6,     7,     3,     4,     5,     6,     7,    25,
+      87,    35,   -15,    26,    27,    10,    28,     8,     9,    91,
+      10,    47,    29,    30,    31,    20,    47,    75,    76,    77,
+      78,    79,    75,    76,    77,    78,    79,    22,    49,    50,
+      51,    18,    19,   -64,   -64,    34,    38,    39,    44,    41,
+      47,    55,    57,    58,    61,    73,    80,    85,    60,    74,
+      82,    59,    83,    84,    62,    89,    90,    88,     0,     0,
+      48
 };
 
-#define yypact_value_is_default(yystate) \
-  ((yystate) == (-61))
-
-#define yytable_value_is_error(yytable_value) \
-  YYID (0)
-
-static const yytype_uint8 yycheck[] =
+static const yytype_int8 yycheck[] =
 {
-       3,     0,     5,     6,     7,     3,     3,     5,     6,    13,
+       3,     0,     5,     6,     7,     3,    21,     5,     6,    13,
       14,    15,    16,    17,    13,    14,    15,    16,    17,     3,
-      80,    21,    21,     7,    28,    21,    25,    26,    88,    28,
-      33,    33,    28,     3,     4,    33,     8,     9,    10,    11,
-      12,     8,     9,    10,    11,    12,    22,    23,    24,    18,
-      19,    20,    34,    35,    27,     3,     3,     3,    33,    27,
-       3,     3,     3,    34,    36,     3,    44,    60,    57,    35,
-      35,    34,    58,    35,    82,    87,    37,    41
+      81,    28,    21,     7,    21,    29,    23,    26,    27,    90,
+      29,    34,    22,    23,    24,     3,    34,     8,     9,    10,
+      11,    12,     8,     9,    10,    11,    12,    25,    18,    19,
+      20,     3,     4,    35,    36,     3,     3,    34,     3,    28,
+      34,    36,     3,     3,    36,     3,    37,     3,    35,    61,
+      35,    51,    36,    73,    55,    38,    89,    83,    -1,    -1,
+      42
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,    39,     0,    13,    14,    15,    16,    17,    25,    26,
-      28,    40,    41,    42,    44,    46,    53,    54,     3,     4,
-       3,    21,    56,     3,     7,    43,    22,    23,    24,    57,
-      45,    43,    27,    52,     3,     3,    33,    47,    55,    48,
-      27,    60,    18,    19,    20,    49,    50,    51,     3,    58,
-      59,    33,    61,     3,     3,    44,    34,    35,    35,    62,
-       3,    51,    59,     3,     5,     6,    43,    61,    63,    64,
-      65,    67,    68,    47,     8,     9,    10,    11,    12,    36,
-      66,    34,    35,     3,     3,    68,    65,    37,    66,    68
+       0,    40,     0,    13,    14,    15,    16,    17,    26,    27,
+      29,    41,    42,    43,    45,    47,    54,    55,     3,     4,
+       3,    21,    25,    57,    58,     3,     7,    44,    44,    22,
+      23,    24,    59,    46,     3,    28,    53,    56,     3,    34,
+      48,    28,    62,    49,     3,    60,    61,    34,    63,    18,
+      19,    20,    50,    51,    52,    36,    64,     3,     3,    45,
+      35,    36,    61,     3,     5,     6,    44,    63,    65,    66,
+      67,    69,    70,     3,    52,     8,     9,    10,    11,    12,
+      37,    68,    35,    36,    48,     3,     3,    70,    67,    38,
+      68,    70
 };
 
 #define yyerrok                (yyerrstatus = 0)
@@ -758,18 +760,9 @@ static const yytype_uint8 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  However,
-   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
-   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
-   discussed.  */
+   Once GCC version 2 has supplanted version 1, this can go.  */
 
 #define YYFAIL         goto yyerrlab
-#if defined YYFAIL
-  /* This is here to suppress warnings from the GCC cpp's
-     -Wunused-macros.  Normally we don't worry about that warning, but
-     some users do, and we want to make it easy for users to remove
-     YYFAIL uses, which will produce warnings from Bison 2.5.  */
-#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -779,6 +772,7 @@ do                                                          \
     {                                                          \
       yychar = (Token);                                                \
       yylval = (Value);                                                \
+      yytoken = YYTRANSLATE (yychar);                          \
       YYPOPSTACK (1);                                          \
       goto yybackup;                                           \
     }                                                          \
@@ -825,7 +819,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)                 \
      fprintf (File, "%d.%d-%d.%d",                     \
              (Loc).first_line, (Loc).first_column,     \
@@ -1034,6 +1028,7 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
+\f
 
 #if YYERROR_VERBOSE
 
@@ -1136,142 +1131,115 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
-   about the unexpected token YYTOKEN for the state stack whose top is
-   YYSSP.
-
-   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
-   not large enough to hold the message.  In that case, also set
-   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
-   required number of bytes is too large to store.  */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
-                yytype_int16 *yyssp, int yytoken)
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
 {
-  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
-  YYSIZE_T yysize = yysize0;
-  YYSIZE_T yysize1;
-  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-  /* Internationalized format string. */
-  const char *yyformat = 0;
-  /* Arguments of yyformat. */
-  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-  /* Number of reported tokens (one for the "unexpected", one per
-     "expected"). */
-  int yycount = 0;
-
-  /* There are many possibilities here to consider:
-     - Assume YYFAIL is not used.  It's too flawed to consider.  See
-       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
-       for details.  YYERROR is fine as it does not invoke this
-       function.
-     - If this state is a consistent state with a default action, then
-       the only way this function was invoked is if the default action
-       is an error action.  In that case, don't check for expected
-       tokens because there are none.
-     - The only way there can be no lookahead present (in yychar) is if
-       this state is a consistent state with a default action.  Thus,
-       detecting the absence of a lookahead is sufficient to determine
-       that there is no unexpected or expected token to report.  In that
-       case, just report a simple "syntax error".
-     - Don't assume there isn't a lookahead just because this state is a
-       consistent state with a default action.  There might have been a
-       previous inconsistent state, consistent state with a non-default
-       action, or user semantic action that manipulated yychar.
-     - Of course, the expected token list depends on states to have
-       correct lookahead information, and it depends on the parser not
-       to perform extra reductions after fetching a lookahead from the
-       scanner and before detecting a syntax error.  Thus, state merging
-       (from LALR or IELR) and default reductions corrupt the expected
-       token list.  However, the list is correct for canonical LR with
-       one exception: it will still contain any token that will not be
-       accepted due to an error action in a later state.
-  */
-  if (yytoken != YYEMPTY)
-    {
-      int yyn = yypact[*yyssp];
-      yyarg[yycount++] = yytname[yytoken];
-      if (!yypact_value_is_default (yyn))
-        {
-          /* Start YYX at -YYN if negative to avoid negative indexes in
-             YYCHECK.  In other words, skip the first -YYN actions for
-             this state because they are default actions.  */
-          int yyxbegin = yyn < 0 ? -yyn : 0;
-          /* Stay within bounds of both yycheck and yytname.  */
-          int yychecklim = YYLAST - yyn + 1;
-          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-          int yyx;
-
-          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
-                && !yytable_value_is_error (yytable[yyx + yyn]))
-              {
-                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-                  {
-                    yycount = 1;
-                    yysize = yysize0;
-                    break;
-                  }
-                yyarg[yycount++] = yytname[yyx];
-                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-                if (! (yysize <= yysize1
-                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
-                  return 2;
-                yysize = yysize1;
-              }
-        }
-    }
+  int yyn = yypact[yystate];
 
-  switch (yycount)
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
     {
-# define YYCASE_(N, S)                      \
-      case N:                               \
-        yyformat = S;                       \
-      break
-      YYCASE_(0, YY_("syntax error"));
-      YYCASE_(1, YY_("syntax error, unexpected %s"));
-      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
-      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
-      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
-      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
-    }
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+        constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+                   + sizeof yyexpecting - 1
+                   + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+                      * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+        YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+       if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+         {
+           if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+             {
+               yycount = 1;
+               yysize = yysize0;
+               yyformat[sizeof yyunexpected - 1] = '\0';
+               break;
+             }
+           yyarg[yycount++] = yytname[yyx];
+           yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+           yysize_overflow |= (yysize1 < yysize);
+           yysize = yysize1;
+           yyfmt = yystpcpy (yyfmt, yyprefix);
+           yyprefix = yyor;
+         }
 
-  yysize1 = yysize + yystrlen (yyformat);
-  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
-    return 2;
-  yysize = yysize1;
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
 
-  if (*yymsg_alloc < yysize)
-    {
-      *yymsg_alloc = 2 * yysize;
-      if (! (yysize <= *yymsg_alloc
-             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
-        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
-      return 1;
-    }
+      if (yysize_overflow)
+       return YYSIZE_MAXIMUM;
 
-  /* Avoid sprintf, as that infringes on the user's name space.
-     Don't have undefined behavior even if the translation
-     produced a string with the wrong number of "%s"s.  */
-  {
-    char *yyp = *yymsg;
-    int yyi = 0;
-    while ((*yyp = *yyformat) != '\0')
-      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
-        {
-          yyp += yytnamerr (yyp, yyarg[yyi++]);
-          yyformat += 2;
-        }
-      else
-        {
-          yyp++;
-          yyformat++;
-        }
-  }
-  return 0;
+      if (yyresult)
+       {
+         /* Avoid sprintf, as that infringes on the user's name space.
+            Don't have undefined behavior even if the translation
+            produced a string with the wrong number of "%s"s.  */
+         char *yyp = yyresult;
+         int yyi = 0;
+         while ((*yyp = *yyf) != '\0')
+           {
+             if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+               {
+                 yyp += yytnamerr (yyp, yyarg[yyi++]);
+                 yyf += 2;
+               }
+             else
+               {
+                 yyp++;
+                 yyf++;
+               }
+           }
+       }
+      return yysize;
+    }
 }
 #endif /* YYERROR_VERBOSE */
+\f
 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -1308,7 +1276,6 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
     }
 }
 
-
 /* Prevent warnings from -Wmissing-prototypes.  */
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
@@ -1325,9 +1292,12 @@ int yyparse ();
 #endif /* ! YYPARSE_PARAM */
 
 
-/*----------.
-| yyparse.  |
-`----------*/
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1391,7 +1361,7 @@ YYLTYPE yylloc;
     YYLTYPE *yylsp;
 
     /* The locations where the error started and ended.  */
-    YYLTYPE yyerror_range[3];
+    YYLTYPE yyerror_range[2];
 
     YYSIZE_T yystacksize;
 
@@ -1438,7 +1408,7 @@ YYLTYPE yylloc;
   yyvsp = yyvs;
   yylsp = yyls;
 
-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+#if YYLTYPE_IS_TRIVIAL
   /* Initialize the default location before parsing starts.  */
   yylloc.first_line   = yylloc.last_line   = 1;
   yylloc.first_column = yylloc.last_column = 1;
@@ -1540,7 +1510,7 @@ yybackup:
 
   /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yypact_value_is_default (yyn))
+  if (yyn == YYPACT_NINF)
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
@@ -1571,8 +1541,8 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yytable_value_is_error (yyn))
-        goto yyerrlab;
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+       goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
@@ -1628,8 +1598,8 @@ yyreduce:
     {
         case 8:
 
-/* Line 1806 of yacc.c  */
-#line 128 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 129 "config_parser.yy"
     {
                context->HandleInclude((yyvsp[(2) - (2)].text), false, yylloc);
                free((yyvsp[(2) - (2)].text));
@@ -1638,8 +1608,8 @@ yyreduce:
 
   case 9:
 
-/* Line 1806 of yacc.c  */
-#line 133 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 134 "config_parser.yy"
     {
                context->HandleInclude((yyvsp[(2) - (2)].text), true, yylloc);
                free((yyvsp[(2) - (2)].text));
@@ -1648,8 +1618,8 @@ yyreduce:
 
   case 10:
 
-/* Line 1806 of yacc.c  */
-#line 139 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 140 "config_parser.yy"
     {
                context->HandleLibrary((yyvsp[(2) - (2)].text));
                free((yyvsp[(2) - (2)].text));
@@ -1658,8 +1628,8 @@ yyreduce:
 
   case 12:
 
-/* Line 1806 of yacc.c  */
-#line 146 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 147 "config_parser.yy"
     {
                (yyval.text) = (yyvsp[(1) - (1)].text);
                free((yyvsp[(1) - (1)].text));
@@ -1668,8 +1638,8 @@ yyreduce:
 
   case 13:
 
-/* Line 1806 of yacc.c  */
-#line 153 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 154 "config_parser.yy"
     {
                String name = String((yyvsp[(3) - (3)].text));
                free((yyvsp[(3) - (3)].text));
@@ -1688,8 +1658,8 @@ yyreduce:
 
   case 14:
 
-/* Line 1806 of yacc.c  */
-#line 168 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 169 "config_parser.yy"
     {
                TypeRuleList::Ptr ruleList = *(yyvsp[(6) - (6)].variant);
                m_Type->GetRuleList()->AddRules(ruleList);
@@ -1705,8 +1675,8 @@ yyreduce:
 
   case 15:
 
-/* Line 1806 of yacc.c  */
-#line 182 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 183 "config_parser.yy"
     {
                (yyval.num) = 0;
        }
@@ -1714,8 +1684,8 @@ yyreduce:
 
   case 16:
 
-/* Line 1806 of yacc.c  */
-#line 186 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 187 "config_parser.yy"
     {
                (yyval.num) = 1;
        }
@@ -1723,8 +1693,8 @@ yyreduce:
 
   case 17:
 
-/* Line 1806 of yacc.c  */
-#line 192 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 193 "config_parser.yy"
     {
                m_RuleLists.push(boost::make_shared<TypeRuleList>());
        }
@@ -1732,8 +1702,8 @@ yyreduce:
 
   case 18:
 
-/* Line 1806 of yacc.c  */
-#line 197 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 198 "config_parser.yy"
     {
                (yyval.variant) = new Value(m_RuleLists.top());
                m_RuleLists.pop();
@@ -1742,8 +1712,8 @@ yyreduce:
 
   case 24:
 
-/* Line 1806 of yacc.c  */
-#line 212 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 213 "config_parser.yy"
     {
                m_RuleLists.top()->AddRequire((yyvsp[(2) - (2)].text));
                free((yyvsp[(2) - (2)].text));
@@ -1752,8 +1722,8 @@ yyreduce:
 
   case 25:
 
-/* Line 1806 of yacc.c  */
-#line 217 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 218 "config_parser.yy"
     {
                m_RuleLists.top()->SetValidator((yyvsp[(2) - (2)].text));
                free((yyvsp[(2) - (2)].text));
@@ -1762,8 +1732,8 @@ yyreduce:
 
   case 26:
 
-/* Line 1806 of yacc.c  */
-#line 222 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 223 "config_parser.yy"
     {
                TypeRule rule((yyvsp[(2) - (3)].type), (yyvsp[(3) - (3)].text), TypeRuleList::Ptr(), yylloc);
                free((yyvsp[(3) - (3)].text));
@@ -1774,8 +1744,8 @@ yyreduce:
 
   case 27:
 
-/* Line 1806 of yacc.c  */
-#line 229 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 230 "config_parser.yy"
     {
                TypeRule rule((yyvsp[(2) - (4)].type), (yyvsp[(3) - (4)].text), *(yyvsp[(4) - (4)].variant), yylloc);
                free((yyvsp[(3) - (4)].text));
@@ -1786,8 +1756,8 @@ yyreduce:
 
   case 29:
 
-/* Line 1806 of yacc.c  */
-#line 239 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 240 "config_parser.yy"
     {
                m_Type->SetParent((yyvsp[(2) - (2)].text));
                free((yyvsp[(2) - (2)].text));
@@ -1796,8 +1766,8 @@ yyreduce:
 
   case 34:
 
-/* Line 1806 of yacc.c  */
-#line 250 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 251 "config_parser.yy"
     {
                (yyval.type) = (yyvsp[(1) - (1)].type);
        }
@@ -1805,8 +1775,8 @@ yyreduce:
 
   case 35:
 
-/* Line 1806 of yacc.c  */
-#line 256 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 257 "config_parser.yy"
     {
                m_Abstract = false;
                m_Local = false;
@@ -1815,16 +1785,16 @@ yyreduce:
 
   case 36:
 
-/* Line 1806 of yacc.c  */
-#line 261 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 262 "config_parser.yy"
     {
                m_Item = boost::make_shared<ConfigItemBuilder>(yylloc);
 
-               m_Item->SetType((yyvsp[(4) - (5)].text));
-               free((yyvsp[(4) - (5)].text));
+               m_Item->SetType((yyvsp[(3) - (4)].text));
+               free((yyvsp[(3) - (4)].text));
 
-               m_Item->SetName((yyvsp[(5) - (5)].text));
-               free((yyvsp[(5) - (5)].text));
+               m_Item->SetName((yyvsp[(4) - (4)].text));
+               free((yyvsp[(4) - (4)].text));
 
                m_Item->SetUnit(ConfigCompilerContext::GetContext()->GetUnit());
        }
@@ -1832,11 +1802,11 @@ yyreduce:
 
   case 37:
 
-/* Line 1806 of yacc.c  */
-#line 273 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 274 "config_parser.yy"
     {
-               ExpressionList::Ptr exprl = *(yyvsp[(8) - (8)].variant);
-               delete (yyvsp[(8) - (8)].variant);
+               ExpressionList::Ptr exprl = *(yyvsp[(7) - (7)].variant);
+               delete (yyvsp[(7) - (7)].variant);
 
                m_Item->AddExpressionList(exprl);
                m_Item->SetLocal(m_Local);
@@ -1847,57 +1817,66 @@ yyreduce:
        }
     break;
 
-  case 40:
+  case 39:
+
+/* Line 1455 of yacc.c  */
+#line 289 "config_parser.yy"
+    {
+               m_Abstract = true;
+       }
+    break;
+
+  case 42:
 
-/* Line 1806 of yacc.c  */
-#line 291 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 298 "config_parser.yy"
     {
                m_Abstract = true;
        }
     break;
 
-  case 41:
+  case 43:
 
-/* Line 1806 of yacc.c  */
-#line 295 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 302 "config_parser.yy"
     {
                m_Local = true;
        }
     break;
 
-  case 44:
+  case 46:
 
-/* Line 1806 of yacc.c  */
-#line 305 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 312 "config_parser.yy"
     {
                m_Item->AddParent((yyvsp[(1) - (1)].text));
                free((yyvsp[(1) - (1)].text));
        }
     break;
 
-  case 47:
+  case 49:
 
-/* Line 1806 of yacc.c  */
-#line 316 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 323 "config_parser.yy"
     {
                m_ExpressionLists.push(boost::make_shared<ExpressionList>());
        }
     break;
 
-  case 48:
+  case 50:
 
-/* Line 1806 of yacc.c  */
-#line 321 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 328 "config_parser.yy"
     {
                (yyval.variant) = new Value(m_ExpressionLists.top());
                m_ExpressionLists.pop();
        }
     break;
 
-  case 54:
+  case 56:
 
-/* Line 1806 of yacc.c  */
-#line 336 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 343 "config_parser.yy"
     {
                Expression expr((yyvsp[(1) - (3)].text), (yyvsp[(2) - (3)].op), *(yyvsp[(3) - (3)].variant), yylloc);
                free((yyvsp[(1) - (3)].text));
@@ -1907,10 +1886,10 @@ yyreduce:
        }
     break;
 
-  case 55:
+  case 57:
 
-/* Line 1806 of yacc.c  */
-#line 344 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 351 "config_parser.yy"
     {
                Expression subexpr((yyvsp[(3) - (6)].text), (yyvsp[(5) - (6)].op), *(yyvsp[(6) - (6)].variant), yylloc);
                free((yyvsp[(3) - (6)].text));
@@ -1926,10 +1905,10 @@ yyreduce:
        }
     break;
 
-  case 56:
+  case 58:
 
-/* Line 1806 of yacc.c  */
-#line 358 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 365 "config_parser.yy"
     {
                Expression expr(String(), OperatorSet, *(yyvsp[(1) - (1)].variant), yylloc);
                delete (yyvsp[(1) - (1)].variant);
@@ -1938,47 +1917,47 @@ yyreduce:
        }
     break;
 
-  case 61:
+  case 63:
 
-/* Line 1806 of yacc.c  */
-#line 371 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 378 "config_parser.yy"
     {
                (yyval.op) = (yyvsp[(1) - (1)].op);
        }
     break;
 
-  case 62:
+  case 64:
 
-/* Line 1806 of yacc.c  */
-#line 377 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 384 "config_parser.yy"
     {
                (yyval.variant) = new Value((yyvsp[(1) - (1)].text));
                free((yyvsp[(1) - (1)].text));
        }
     break;
 
-  case 63:
+  case 65:
 
-/* Line 1806 of yacc.c  */
-#line 382 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 389 "config_parser.yy"
     {
                (yyval.variant) = new Value((yyvsp[(1) - (1)].num));
        }
     break;
 
-  case 64:
+  case 66:
 
-/* Line 1806 of yacc.c  */
-#line 386 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 393 "config_parser.yy"
     {
                (yyval.variant) = new Value();
        }
     break;
 
-  case 66:
+  case 68:
 
-/* Line 1806 of yacc.c  */
-#line 393 "config_parser.yy"
+/* Line 1455 of yacc.c  */
+#line 400 "config_parser.yy"
     {
                (yyval.variant) = (yyvsp[(1) - (1)].variant);
        }
@@ -1986,21 +1965,10 @@ yyreduce:
 
 
 
-/* Line 1806 of yacc.c  */
-#line 1991 "config_parser.cc"
+/* Line 1455 of yacc.c  */
+#line 1970 "config_parser.cc"
       default: break;
     }
-  /* User semantic actions sometimes alter yychar, and that requires
-     that yytoken be updated with the new translation.  We take the
-     approach of translating immediately before every use of yytoken.
-     One alternative is translating here after every semantic action,
-     but that translation would be missed if the semantic action invokes
-     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
-     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
-     incorrect destructor might then be invoked immediately.  In the
-     case of YYERROR or YYBACKUP, subsequent parser actions might lead
-     to an incorrect destructor call or verbose syntax error message
-     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -2029,10 +1997,6 @@ yyreduce:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
-  /* Make sure we have latest lookahead translation.  See comments at
-     user semantic actions for why this is necessary.  */
-  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -2040,40 +2004,41 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (&yylloc, context, YY_("syntax error"));
 #else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
-                                        yyssp, yytoken)
       {
-        char const *yymsgp = YY_("syntax error");
-        int yysyntax_error_status;
-        yysyntax_error_status = YYSYNTAX_ERROR;
-        if (yysyntax_error_status == 0)
-          yymsgp = yymsg;
-        else if (yysyntax_error_status == 1)
-          {
-            if (yymsg != yymsgbuf)
-              YYSTACK_FREE (yymsg);
-            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
-            if (!yymsg)
-              {
-                yymsg = yymsgbuf;
-                yymsg_alloc = sizeof yymsgbuf;
-                yysyntax_error_status = 2;
-              }
-            else
-              {
-                yysyntax_error_status = YYSYNTAX_ERROR;
-                yymsgp = yymsg;
-              }
-          }
-        yyerror (&yylloc, context, yymsgp);
-        if (yysyntax_error_status == 2)
-          goto yyexhaustedlab;
+       YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+       if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+         {
+           YYSIZE_T yyalloc = 2 * yysize;
+           if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+             yyalloc = YYSTACK_ALLOC_MAXIMUM;
+           if (yymsg != yymsgbuf)
+             YYSTACK_FREE (yymsg);
+           yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+           if (yymsg)
+             yymsg_alloc = yyalloc;
+           else
+             {
+               yymsg = yymsgbuf;
+               yymsg_alloc = sizeof yymsgbuf;
+             }
+         }
+
+       if (0 < yysize && yysize <= yymsg_alloc)
+         {
+           (void) yysyntax_error (yymsg, yystate, yychar);
+           yyerror (&yylloc, context, yymsg);
+         }
+       else
+         {
+           yyerror (&yylloc, context, YY_("syntax error"));
+           if (yysize != 0)
+             goto yyexhaustedlab;
+         }
       }
-# undef YYSYNTAX_ERROR
 #endif
     }
 
-  yyerror_range[1] = yylloc;
+  yyerror_range[0] = yylloc;
 
   if (yyerrstatus == 3)
     {
@@ -2110,7 +2075,7 @@ yyerrorlab:
   if (/*CONSTCOND*/ 0)
      goto yyerrorlab;
 
-  yyerror_range[1] = yylsp[1-yylen];
+  yyerror_range[0] = yylsp[1-yylen];
   /* Do not reclaim the symbols of the rule which action triggered
      this YYERROR.  */
   YYPOPSTACK (yylen);
@@ -2129,7 +2094,7 @@ yyerrlab1:
   for (;;)
     {
       yyn = yypact[yystate];
-      if (!yypact_value_is_default (yyn))
+      if (yyn != YYPACT_NINF)
        {
          yyn += YYTERROR;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -2144,7 +2109,7 @@ yyerrlab1:
       if (yyssp == yyss)
        YYABORT;
 
-      yyerror_range[1] = *yylsp;
+      yyerror_range[0] = *yylsp;
       yydestruct ("Error: popping",
                  yystos[yystate], yyvsp, yylsp, context);
       YYPOPSTACK (1);
@@ -2154,10 +2119,10 @@ yyerrlab1:
 
   *++yyvsp = yylval;
 
-  yyerror_range[2] = yylloc;
+  yyerror_range[1] = yylloc;
   /* Using YYLLOC is tempting, but would change the location of
      the lookahead.  YYLOC is available though.  */
-  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
   *++yylsp = yyloc;
 
   /* Shift the error token.  */
@@ -2193,13 +2158,8 @@ yyexhaustedlab:
 
 yyreturn:
   if (yychar != YYEMPTY)
-    {
-      /* Make sure we have latest lookahead translation.  See comments at
-         user semantic actions for why this is necessary.  */
-      yytoken = YYTRANSLATE (yychar);
-      yydestruct ("Cleanup: discarding lookahead",
-                  yytoken, &yylval, &yylloc, context);
-    }
+     yydestruct ("Cleanup: discarding lookahead",
+                yytoken, &yylval, &yylloc, context);
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -2224,7 +2184,7 @@ yyreturn:
 
 
 
-/* Line 2067 of yacc.c  */
-#line 397 "config_parser.yy"
+/* Line 1675 of yacc.c  */
+#line 404 "config_parser.yy"
 
 
index 975524e8549b5e17a17740092cac24a1179b45d6..924d924166ff99fa02554d850c30ca67363fcf62 100644 (file)
@@ -1,8 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Bison interface for Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1.  */
+
+/* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    
    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
@@ -32,7 +34,7 @@
 
 /* "%code requires" blocks.  */
 
-/* Line 2068 of yacc.c  */
+/* Line 1676 of yacc.c  */
 #line 1 "config_parser.yy"
 
 /******************************************************************************
@@ -63,8 +65,8 @@ using namespace icinga;
 
 
 
-/* Line 2068 of yacc.c  */
-#line 68 "config_parser.h"
+/* Line 1676 of yacc.c  */
+#line 70 "config_parser.h"
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -94,10 +96,11 @@ using namespace icinga;
      T_ABSTRACT = 277,
      T_LOCAL = 278,
      T_OBJECT = 279,
-     T_INCLUDE = 280,
-     T_LIBRARY = 281,
-     T_INHERITS = 282,
-     T_PARTIAL = 283
+     T_TEMPLATE = 280,
+     T_INCLUDE = 281,
+     T_LIBRARY = 282,
+     T_INHERITS = 283,
+     T_PARTIAL = 284
    };
 #endif
 /* Tokens.  */
@@ -123,10 +126,11 @@ using namespace icinga;
 #define T_ABSTRACT 277
 #define T_LOCAL 278
 #define T_OBJECT 279
-#define T_INCLUDE 280
-#define T_LIBRARY 281
-#define T_INHERITS 282
-#define T_PARTIAL 283
+#define T_TEMPLATE 280
+#define T_INCLUDE 281
+#define T_LIBRARY 282
+#define T_INHERITS 283
+#define T_PARTIAL 284
 
 
 
@@ -135,7 +139,7 @@ using namespace icinga;
 typedef union YYSTYPE
 {
 
-/* Line 2068 of yacc.c  */
+/* Line 1676 of yacc.c  */
 #line 38 "config_parser.yy"
 
        char *text;
@@ -146,8 +150,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 2068 of yacc.c  */
-#line 151 "config_parser.h"
+/* Line 1676 of yacc.c  */
+#line 155 "config_parser.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
index aca118e8fa5500f36aaf1439c04a8d6e962f8816..58c5f57178affea4c610fd45169a37e776ac0e6f 100644 (file)
@@ -65,6 +65,7 @@ using namespace icinga;
 %token T_ABSTRACT
 %token T_LOCAL
 %token T_OBJECT
+%token T_TEMPLATE
 %token T_INCLUDE
 %token T_LIBRARY
 %token T_INHERITS
@@ -257,22 +258,22 @@ object:
                m_Abstract = false;
                m_Local = false;
        }
-attributes T_OBJECT identifier T_STRING
+object_declaration identifier T_STRING
        {
                m_Item = boost::make_shared<ConfigItemBuilder>(yylloc);
 
-               m_Item->SetType($4);
-               free($4);
+               m_Item->SetType($3);
+               free($3);
 
-               m_Item->SetName($5);
-               free($5);
+               m_Item->SetName($4);
+               free($4);
 
                m_Item->SetUnit(ConfigCompilerContext::GetContext()->GetUnit());
        }
 object_inherits_specifier expressionlist
        {
-               ExpressionList::Ptr exprl = *$8;
-               delete $8;
+               ExpressionList::Ptr exprl = *$7;
+               delete $7;
 
                m_Item->AddExpressionList(exprl);
                m_Item->SetLocal(m_Local);
@@ -283,6 +284,12 @@ object_inherits_specifier expressionlist
        }
        ;
 
+object_declaration: attributes T_OBJECT
+       | T_TEMPLATE
+       {
+               m_Abstract = true;
+       }
+
 attributes: /* empty */
        | attributes attribute
        ;