Skip to content

Commit

Permalink
#3: do not prepend leading zeroes to CharCode values
Browse files Browse the repository at this point in the history
  • Loading branch information
GuntherRademacher committed Jun 7, 2020
1 parent 0c432a4 commit a1e2ce3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
defaultTasks 'build'
build.dependsOn 'distZip'

version = '1.62'
version = '1.62+'
def buildTime = new Date()

def generatedSrc = "$buildDir/generated-src/main/java"
Expand Down
7 changes: 3 additions & 4 deletions src/main/resources/de/bottlecaps/railroad/xq/cst-to-ast.xq
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ declare namespace g="http://www.w3.org/2001/03/XPath/grammar";

(:~
: Convert a char code from the EBNF input into the representation
: for AST use, i.e. strip the leading "#x" and ensure the result
: has at least 4 hex digits.
: for AST use, i.e. strip the leading "#x".
:
: @param $code the char code as it occurred in the input, with a "#x"
: prefix.
: @return the char code string normalized to at least 4 hex digits.
: @return the hex char code string, without the "#x" prefix.
:)
declare function a:charCode($code as xs:string) as xs:string
{
concat(substring('00000', string-length($code)), substring($code, 3))
substring($code, 3)
};

(:~
Expand Down

0 comments on commit a1e2ce3

Please sign in to comment.