lexer grammar ProgressLexer;

@header{
import java.util.*;
}

@members {
public static Map<Integer, String> types = new HashMap<>();
public static List<String> keywords = new ArrayList<>();
static
{
    types.put(INCLUDE, "include");
    types.put(MESSAGE, "keyword");
    types.put(DEFINE, "keyword");
    types.put(TEXT, "variable");
    types.put(LCURLY, "delimiter");
    types.put(AMP, "delimiter");
    types.put(RCURLY, "delimiter");
    types.put(DQUOTE, "delimiter");
    types.put(DOT, "operator");
    types.put(STRING_LITERAL, "string");
    types.put(DO, "keyword");
    types.put(END, "keyword");

}
static
{
    keywords.add("message");
    keywords.add("scoped-define");
    keywords.add("global-define");
}
}

INCLUDE : LCURLY TEXT DOT TEXT RCURLY ;
MESSAGE : 'message' | 'MESSAGE' ;
DO : 'DO:' | 'do:' ;
END : 'END' | 'end' ;
DEFINE : 'scoped-define' | 'global-define' ;
TEXT : (~[ .{}&"\r\n])+ ;
LCURLY : '{' ;
AMP : '&' ;
RCURLY : '}' ;
DQUOTE : '"' ;
DOT : '.' ;
STRING_LITERAL : DQUOTE (TEXT | ' ')* DQUOTE ;

WS : [ \t\r\n]+;
