O'Reilly logo

The “Oslo” Modeling Language by Don Box, Brad Lovering, David Langworthy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Attributes

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

AttributeSections:
  AttributeSection
  AttributeSections AttributeSection
AttributeSection:
  @{  Nodes  }

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
          = " ";
    }
}

 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required