Skip to content

Keyword "then" should be a viable input #19

@jmr2000

Description

@jmr2000

Given this model:

if threat.level == high then {
    perform soundAlarm {in cause = threat;}
} else if threat.level == medium then {
    action sendNotification {in msg = threat;}
} else {
    action beginMonitoring {in target = threat;}
}

We get an error:
[ERROR] StringReader:<16,29>: no viable alternative at input 'ifthreat.level==highthen{', expecting 'requirement', 'connection', 'satisfy', 'connection', '?', 'requirement', 'language', 'satisfy', Name (with additional constraints from connectionUsage), '/', 'return', 'in', 'subject', '-', 'include', 'assign', 'transition', 'use', 'use', 'package', 'readonly', 'assert', 'then', 'assert', 'assert', 'frame', 'assert', 'frame', 'perform', 'allocate', 'allocate', 'verify', 'defined by', 'else', 'verify', 'perform', 'local', 'not', 'join', 'not', 'individual', 'inout', Name (with additional constraints from mCQualifiedName), 'variation', 'message', 'alias', 'interface', 'interface', 'variant', 'part', Name (with additional constraints from anonymousUsage), 'then', Name (with additional constraints from sysMLQualifiedName), 'part', 'send', 'rendering', 'rendering', 'action', 'connection', 'action', 'action', 'allocation', 'action', 'action', 'action', 'action', 'action', 'action', 'action', Name (with additional constraints from bind), 'library', 'redefines', '#', Name (with additional constraints from acceptActionUsage), Name (with additional constraints from inlineAcceptActionUsage), 'decide', Name (with additional constraints from ifActionUsage), 'ref', '@', Name (with additional constraints from allocationUsageParam), Name (with additional constraints from allocationUsageTo), 'abstract', 'flow', Name (with additional constraints from sysMLConditionalSuccession), 'individual', '#', 'require', Name (with additional constraints from sysMLSuccession), 'require', 'allocation', 'dependency', 'require', 'allocation', 'standard', 'allocation', 'flow', 'calc', Name (with additional constraints from forLoopActionUsage), 'calc', Name (with additional constraints from loopActionUsage), 'loop', Name (with additional constraints from whileActionUsage), ':>>', Name (with additional constraints from sendActionUsage), 'analysis', Name (with additional constraints from assignmentActionUsage), 'require', 'analysis', 'for', '<<', 'verification', 'verification', 'assume', 'assume', 'timeslice', 'snapshot', 'assume', 'end', 'view', 'view', 'assume', 'references', 'out', 'first', 'first', 'first', 'derived', 'binding', 'if', 'private', 'filter', 'case', 'if', 'case', 'static', 'accept', 'merge', 'accept', 'occurrence', 'final', 'render', 'occurrence', 'item', 'item', 'timing', 'connect', 'actor', 'subsets', 'event', 'metadata', 'while', 'metadata', 'concern', 'port', 'concern', '[', 'port', 'if', 'viewpoint', 'import', 'viewpoint', ':', 'constraint', 'constraint', 'constraint', 'enum', '[', 'bind', 'enum', 'public', 'rep', 'exhibit', 'exhibit', 'refines', 'succession', 'first', 'stakeholder', 'expose', 'protected', ':>', '::>', 'attribute', 'succession', ':>', '<', 'fork', 'succession', '+', 'attribute', 'state', 'state', 'do' or 'specializes' in rule stack: [SysMLModel, SysMLElement] 
if threat.level == high then {

This should be a valid model but the keyword "then" is not a viable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions