Skip to content

Commit

Permalink
Merge pull request #208 from runtimeverification/Underscore_parsing_i…
Browse files Browse the repository at this point in the history
…ssue

parse MOP files with underscores in file names
  • Loading branch information
xiaohe27 committed Jul 11, 2015
2 parents 990b896 + 1d1d1d1 commit 9d51681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/javamop/JavaMOPMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public static void process(String[] files, String path) throws MOPException, IOE
private static void areValidNames(ArrayList<File> files) {
for (int i = 0; i < files.size(); i++) {
String curName = Tool.getFileName(files.get(i).getPath());
if (!curName.matches("[a-zA-Z_]\\p{Alnum}*")) {
if (!curName.matches("[a-zA-Z_][A-Za-z0-9_]*")) {
System.err.println("The mop name " + curName + " is not valid!");
System.exit(1);
}
Expand Down Expand Up @@ -515,4 +515,4 @@ private static void handleOptions(JavaMOPOptions options, String[] args, JComman
JavaMOPMain.empty_advicebody = true;
}
}
}
}

0 comments on commit 9d51681

Please sign in to comment.