Typical Language Configurations

Case Insensitive Languages

In some cases, e.g. if your SHIFT key is broken, you might want to design a case insensitive language. Xtext offers separate generator fragments for this purpose.

For case insensitive keywords, open your MWE workflow and replace the Antlr related fragments:

// The antlr parser generator fragment.
fragment = parser.antlr.XtextAntlrGeneratorFragment {
//  options = {
// backtrack = true
// }
}
...

// generates a more lightweight Antlr parser and lexer tailored ...
fragment = parser.antlr.XtextAntlrUiGeneratorFragment {
}

with

// The antlr parser generator fragment.
fragment = parser.antlr.ex.rt.AntlrGeneratorFragment {
    options = {
        ignoreCase = true
    }
}
...

// generates a more lightweight Antlr parser and lexer tailored ...
fragment = parser.antlr.ex.ca.ContentAssistParserGeneratorFragment {
    options = {
        ignoreCase = true
    }
}

For case insensitve element names, use the ignoreCase option in your scope fragment, i.e.

fragment = scoping.ImportNamespacesScopingFragment {
    ignoreCase = true
}

or if you are using importURI based global scopes

fragment = scoping.ImportURIScopingFragment {
    ignoreCase = true
}