public static final ArgumentValueState INSTANCE = new ArgumentValueState();
public static final String ID = "PROP_VALUE";
ArgumentValueState() {
super(ID);
this.setEnterHandler(new CharacterHandler() {
@Override
public void handle(ParsingContext ctx) throws CommandFormatException {
if(ctx.getCharacter() != '=') {
getHandler(ctx.getCharacter()).handle(ctx);
}
}});
enterState('[', new DefaultStateWithEndCharacter("BRACKETS", ']', false, true, enterStateHandlers));
enterState('(', new DefaultStateWithEndCharacter("PARENTHESIS", ')', false, true, enterStateHandlers));
enterState('{', new DefaultStateWithEndCharacter("BRACES", '}', false, true, enterStateHandlers));
setLeaveOnWhitespace(true);
if(!Util.isWindows()) {
// on windows we don't escape, this would mess up file system paths for example.
setDefaultHandler(WordCharacterHandler.IGNORE_LB_ESCAPE_ON);
enterState('"', QuotesState.QUOTES_INCLUDED);
} else {
setDefaultHandler(WordCharacterHandler.IGNORE_LB_ESCAPE_OFF);
enterState('"', new QuotesState(true, false));
}
setReturnHandler(new CharacterHandler() {
@Override
public void handle(ParsingContext ctx) throws CommandFormatException {
if(ctx.isEndOfContent()) {
ctx.leaveState();
}