Chapter 14. Attributes

Attributes provide metadata that can be used to interpret the language feature they modify.

AttributeSections:  AttributeSection  AttributeSections AttributeSectionAttributeSection:  @{  Nodes  }

14.1 Case Sensitive

The CaseSensitive attribute controls whether tokens are matched with or without case sensitivity. The default value is true. The following language recognizes "Hello World", "HELLO World", and "hELLO WorLD".

module HelloWorld {    @{CaseSensitive[false]}    language HelloWorld {        syntax Main          = Hello World;        token Hello          = "Hello";        token World          = "World";        interleave Whitespace          = " ";    }}

Get The “Oslo” Modeling Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.