diff options
author | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2013-06-10 14:58:35 +0200 |
---|---|---|
committer | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2013-06-10 14:58:35 +0200 |
commit | 467d39b9047547ff94a37fdcb8805623ef09d542 (patch) | |
tree | 9fbb23471e3718c35546d4b6ff0a1e959a18459d /Grammar.pp | |
parent | d2f8208f2951691b550d912b5f725d2371af9e9a (diff) | |
download | Praspel-467d39b9047547ff94a37fdcb8805623ef09d542.zip Praspel-467d39b9047547ff94a37fdcb8805623ef09d542.tar.gz Praspel-467d39b9047547ff94a37fdcb8805623ef09d542.tar.bz2 |
Add the @default clause!
The default clause represents a default/else behavior.
Diffstat (limited to 'Grammar.pp')
-rw-r--r-- | Grammar.pp | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -52,6 +52,7 @@ %token at_throwable @throwable %token at_invariant @invariant %token at_behavior @behavior +%token at_default @default %token at_description @description // Constructions. @@ -126,7 +127,8 @@ method: | invariant() ) ::semicolon::+ - | ( behavior() | description() ) ::semicolon::* + | ( behavior() ::semicolon::* )+ default()? ::semicolon::* + | description() ::semicolon::* #is: ::at_is:: <pure> @@ -156,11 +158,23 @@ behavior_content: | throwable() | invariant() ) - ::semicolon:: - | behavior() ::semicolon::? + ::semicolon::+ + | ( behavior() ::semicolon::* )+ default()? ::semicolon::* )+ ::_brace:: #behavior +#default: + ::at_default:: ::brace_:: + ( + ( + ensures() + | throwable() + | invariant() + ) + ::semicolon::+ + )+ + ::_brace:: + #description: ::at_description:: string() |