-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3456 from neeels/neels/ttcn3
ttcn: add "template" ["(omit)" | "(value)" | "(present)"]
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--sort=no |
5 changes: 5 additions & 0 deletions
5
Units/parser-ttcn.r/ttcn-template-restriction.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CoffeeTemplates input.ttcn /^module CoffeeTemplates$/;" M | ||
AnyCoffee input.ttcn /^template (present) Coffee AnyCoffee$/;" d | ||
SomeCoffee input.ttcn /^template (value) Coffee SomeCoffee(integer id, charstring description := "")$/;" d | ||
Espresso input.ttcn /^template (omit) Coffee Espresso()$/;" d | ||
Latte input.ttcn /^template (TYPO IN RESTRICTION) Coffee Latte()$/;" d |
32 changes: 32 additions & 0 deletions
32
Units/parser-ttcn.r/ttcn-template-restriction.d/input.ttcn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import from CoffeeTypes all | ||
import from CoffeeConstants all | ||
|
||
module CoffeeTemplates | ||
{ | ||
|
||
template (present) Coffee AnyCoffee | ||
{ | ||
id := ?, | ||
description := ? | ||
} | ||
|
||
template (value) Coffee SomeCoffee(integer id, charstring description := "") | ||
{ | ||
id := id, | ||
description := description | ||
} | ||
|
||
template (omit) Coffee Espresso() | ||
{ | ||
id := c_espressoId, | ||
description := c_espresso | ||
} | ||
|
||
template (TYPO IN RESTRICTION) Coffee Latte() | ||
{ | ||
id := c_latteId, | ||
description := c_latte | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters