Home Download Buy Blog Forum Support

Repeat begin-end rule in syntax definition

Repeat begin-end rule in syntax definition

Postby drautb on Mon Feb 10, 2014 4:35 pm

Hey all,

I'm working on a syntax definition for the Kinetic Rules Language. To start, here is a skeleton "program":

Code: Select all
ruleset RulesetName {
   meta {
      ....
   }
   global {
   
   }
   dispatch {

   }
   rule ruleName1 {
      ....
   }
   rule ruleName2 {
      ....
   }
   rule ruleName3 {
      ....
   }
}


This is my first time writing a syntax definition. I've been defining the syntax using begin-end blocks, starting with the ruleset block. The meta, global, and dispatch blocks can only appear once, but there can be an arbitrary number of rule blocks. The syntax only picks up on the first one however. What is the right way to signal that the rule block can be repeated?

Cheers!
drautb
 
Posts: 4
Joined: Wed Jul 03, 2013 6:23 pm

Re: Repeat begin-end rule in syntax definition

Postby drautb on Mon Feb 10, 2014 10:41 pm

My mistake, this actually already works. The way I had defined the first rule block caused the syntax to not pick up on the rule blocks that followed. :roll: Thanks anyways for reading!
drautb
 
Posts: 4
Joined: Wed Jul 03, 2013 6:23 pm


Return to Plugin Development

Who is online

Users browsing this forum: jbjornson and 5 guests