Redesigning the syntax of Gesture Definition Language

Topics: Gesture Definition, Gesture Recognition Engine
Coordinator
Jul 3, 2010 at 5:53 PM
Edited Jul 4, 2010 at 12:23 AM

The current syntax for gesture definition language allows to define validation conditions in two states (i.e. validation state & condition). We found a number of issues with this syntax including:

  1. some section headers are confusing. For example, whats the difference between "validation state" and "condition".
  2. how can we define gestures that involves validating touch interactions in multiple steps. Although some of the current primitive conditions support that to some extent but this can be improved.
  3. how to use the a section validated in earlier steps as part of current step.
Current Syntax New Syntax

name: <gesture-name>

validation state
    <primitive condition(s)>

condition
    <primitive condition(s)>

return
    <return types>

name: <gesture-name>

validate [as <identifier>]
    <primitive condition(s)>

return
    <return types>

This proposed tries to resolve the above mentioned issues in following ways:

  1. replaced the "validation state" and "condition" by single "validate" block
  2. the new "validate" block can be used multiple times to define gestures that involves multiple steps
  3. a "validation" block may have alias names that can be used in later validation blocks

name: <gesture-name>

validate as Line1
    <primitive condition(s)>

validate as Line2
    <primitive condition(s)>

validate 
    Line1 perpendicularTo Line2 

...

return
    <return types>

 

Please let us know you comments. The latest experimental code can be found in the "GestureLanguage" fork.

Coordinator
Aug 3, 2010 at 10:53 PM

Done. Merged fork with main branch. Also modified all existing gesture definitions according to the new specification.