Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
clarisma committed Dec 9, 2022
2 parents 0ad217e + 36704d2 commit c37672b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -4,7 +4,7 @@

<groupId>com.geodesk</groupId>
<artifactId>geodesk</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>0.1.2</version>
<packaging>jar</packaging>

<name>GeoDesk</name>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/geodesk/feature/match/MatcherParser.java
Expand Up @@ -42,7 +42,8 @@ public class MatcherParser extends Parser
private static final String RBRACKET = "]";

private final static Pattern KEY_IDENTIFIER_PATTERN =
Pattern.compile("[a-zA-Z_][\\w:]*");
// Pattern.compile("[a-zA-Z_][\\w:]*");
Pattern.compile("\\p{L}[[\\p{L}\\p{N}]:_]*");
// TODO: make pattern stricter?
// No, should make more lenient:
// "[a-zA-Z_\u00C0-\u1FFF\u2C00-\uD7FF][\\w:\u00C0-\u1FFF\u2C00-\uD7FF]*"
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/geodesk/feature/match/MatcherSet.java
Expand Up @@ -9,6 +9,11 @@

import static com.geodesk.feature.match.TypeBits.*;

// TODO: Could we consolidate Matcher and MatcherSet?
// (For polyform selectors, we would need to create additional classes)
// For uniform matchers, we would eliminate one object allocation,
// but we would still have the reference indirection

public class MatcherSet
{
private final int types;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/geodesk/feature/match/TypeBits.java
Expand Up @@ -110,6 +110,7 @@ public static String toString(int flags)
return s.toString();
}

// TODO: remove
public static void main(String[] args)
{
Log.debug("%d", 1 << -1);
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/feature/queries.fab
Expand Up @@ -3,6 +3,9 @@
// RegEx
//

query: w[highway][name="Löwengrube"]
highway3: false

query: w[name~".*str.*", ".*house$"]
highway_residential: false
highway3: true
Expand Down Expand Up @@ -968,3 +971,4 @@ query: *[jarbour]

query: *[!jarbour]
jarbour: false

0 comments on commit c37672b

Please sign in to comment.