From a1e2ce38f61bc93b40626cf0d912d211a2c874ad Mon Sep 17 00:00:00 2001 From: Gunther Rademacher Date: Sun, 7 Jun 2020 11:47:51 +0200 Subject: [PATCH] #3: do not prepend leading zeroes to CharCode values --- build.gradle | 2 +- src/main/resources/de/bottlecaps/railroad/xq/cst-to-ast.xq | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index f1fa87e..27328fd 100644 --- a/build.gradle +++ b/build.gradle @@ -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" diff --git a/src/main/resources/de/bottlecaps/railroad/xq/cst-to-ast.xq b/src/main/resources/de/bottlecaps/railroad/xq/cst-to-ast.xq index 43d0a0b..9883c8a 100644 --- a/src/main/resources/de/bottlecaps/railroad/xq/cst-to-ast.xq +++ b/src/main/resources/de/bottlecaps/railroad/xq/cst-to-ast.xq @@ -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) }; (:~