mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final1.git
synced 2024-11-24 01:15:05 +00:00
Correctly handle unicode names
This commit is contained in:
parent
a8367d84b3
commit
6e62cdb6e0
@ -28,7 +28,7 @@ public final class CommandFactory {
|
||||
= Pattern.compile(" \\+?(\\d+) position \\(([+-]?\\d+,[+-]?\\d+)\\)");
|
||||
private static final String CREATE_ENGINE = "create engine";
|
||||
private static final Pattern CREATE_ENGINE_ARGUMENTS
|
||||
= Pattern.compile(" (electrical|diesel|steam) (\\w+) (\\w+) \\+?(\\d+) (true|false) (true|false)");
|
||||
= Pattern.compile(" (electrical|diesel|steam) ([\\p{L}\\p{N}]+) ([\\p{L}\\p{N}]+) \\+?(\\d+) (true|false) (true|false)");
|
||||
private static final String LIST_ENGINES = "list engines";
|
||||
private static final String CREATE_COACH = "create coach";
|
||||
private static final Pattern CREATE_COACH_ARGUMENTS
|
||||
@ -36,14 +36,14 @@ public final class CommandFactory {
|
||||
private static final String LIST_COACHES = "list coaches";
|
||||
private static final String CREATE_TRAIN_SET = "create train-set";
|
||||
private static final Pattern CREATE_TRAIN_SET_ARGUMENTS
|
||||
= Pattern.compile(" (\\w+) (\\w+) \\+?(\\d+) (true|false) (true|false)");
|
||||
= Pattern.compile(" ([\\p{L}\\p{N}]+) ([\\p{L}\\p{N}]+) \\+?(\\d+) (true|false) (true|false)");
|
||||
private static final String LIST_TRAIN_SETS = "list train-sets";
|
||||
private static final String DELETE_ROLLING_STOCK = "delete rolling stock";
|
||||
private static final Pattern DELETE_ROLLING_STOCK_ARGUMENT
|
||||
= Pattern.compile(" (\\w+(-\\w*)?)");
|
||||
= Pattern.compile(" ([\\p{L}\\p{N}]++(-[\\p{L}\\p{N}]+)?)");
|
||||
private static final String ADD_TRAIN = "add train";
|
||||
private static final Pattern ADD_TRAIN_ARGUMENTS
|
||||
= Pattern.compile(" \\+?(\\d+) ((\\w+-\\w+)|(W\\+?\\d+))");
|
||||
= Pattern.compile(" \\+?(\\d+) (([\\p{L}\\p{N}]+-[\\p{L}\\p{N}]+)|(W\\+?\\d+))");
|
||||
private static final String DELETE_TRAIN = "delete train";
|
||||
private static final String LIST_TRAINS = "list trains";
|
||||
private static final String SHOW_TRAIN = "show train";
|
||||
|
Loading…
Reference in New Issue
Block a user