Hi,
I think I found a solution to use serializer 2.0 for case insensitive language
But I am not sure if this is the correct way to go as the class is marked as restricted.
The backtracking semantic serializer refuses to use the correct grammar because the keyword does not match case. This can be fixed by replaceing the KeywordSerializer by a case insensitive one:
public class IgnoreCaseKeywordSerializer extends KeywordSerializer {
@Override
public boolean isValid(EObject context, Keyword keyword, Object value, Acceptor errorAcceptor) {
return keyword.getValue().equalsIgnoreCase((String)value);
}
}
and add this to the languages RuntimeModule:
public Class<? extends org.eclipse.xtext.serializer.tokens.IKeywordSerializer> bindIKeywordSerializer() {
return com.ibm.vlsi.xtext.serializer.IgnoreCaseKeywordSerializer.class;
}