this(propSeparator, new PropertyValueState(propSeparator, listEnd), listEnd);
}
PropertyState(char propSeparator, PropertyValueState valueState, char...listEnd) {
super(ID);
setEnterHandler(new CharacterHandler(){
@Override
public void handle(ParsingContext ctx) throws CommandFormatException {
if(ctx.getCharacter() == '\\') {
ctx.enterState(EscapeCharacterState.INSTANCE);
} else {
ctx.getCallbackHandler().character(ctx);
}
}});
for(int i = 0; i < listEnd.length; ++i) {
putHandler(listEnd[i], GlobalCharacterHandlers.LEAVE_STATE_HANDLER);
}
enterState('=', new NameValueSeparatorState(valueState));
enterState('\\', EscapeCharacterState.INSTANCE);
setDefaultHandler(GlobalCharacterHandlers.CONTENT_CHARACTER_HANDLER);
setReturnHandler(new CharacterHandler() {
@Override
public void handle(ParsingContext ctx) throws CommandFormatException {
if(ctx.isEndOfContent()) {
ctx.leaveState();
return;