Skip to content

Commit

Permalink
Merge pull request #234 from sebratton/bree-java-9
Browse files Browse the repository at this point in the history
Allow for BREE JavaSE > 9 (e.g. 'JavaSE-9')
  • Loading branch information
sebratton committed Jul 23, 2023
2 parents 55b2b34 + 54a5691 commit 9f88cf7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public interface Grammar {
public static final String DIGIT = "[0-9]";
public static final String ALPHA = "[A-Za-z]";
public static final String ALPHANUM = DIGIT + '|' + ALPHA;
public static final String TOKEN = "(?:" + ALPHANUM + "|_|-)+";
public static final String TOKEN = "(?:" + ALPHANUM + "|_|-)+?";
public static final String EXTENDED = "(?:" + ALPHANUM + "|_|-|\\.)+";
public static final String QUOTED_STRING = "\"(?:[^\\\\\"\r\n\u0000]|\\\\\"|\\\\\\\\)*\"";
public static final String ARGUMENT = EXTENDED + '|' + QUOTED_STRING;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ public void testParser3() {
public void testParser4() {
doTestParser("JavaSE-1.6", "JavaSE", "1.6");
}



@Test
public void testParser5() {
doTestParser("AA/BB-1.7", "AA/BB", "1.7");
Expand All @@ -129,6 +130,22 @@ public void testParser6() {
public void testParser7() {
doTestParser("MyEE-badVersion", "MyEE-badVersion", (Version)null);
}

@Test
public void testParser8() {
doTestParser("JavaSE-9", "JavaSE", "9");
}

@Test
public void testParser9() {
doTestParser("JavaSE-10", "JavaSE", "10");
}

@Test
public void testParser10() {
doTestParser("JavaSE-17", "JavaSE", "17");
}


private void assertClause(BundleRequiredExecutionEnvironmentHeader.Clause clause, String clauseStr, String name, String version, String filter) {
assertClause(clause, clauseStr, name, Version.parseVersion(version), filter);
Expand Down

0 comments on commit 9f88cf7

Please sign in to comment.