Skip to content

Commit

Permalink
Tidy up xsd2raw and move to 1.1.4-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Mar 3, 2024
1 parent 4b35fc0 commit 0b4a822
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions xsd2vdm/src/main/java/xsd2vdm/XSDElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ protected String toVDM(String indent)

try
{
if (value.matches("(\\d+ ?)+"))
if (value.matches("([0123456789.+-eE]+ ?)+"))
{
List<String> nums = new Vector<String>();

Pattern p = Pattern.compile("\\d+");
Pattern p = Pattern.compile("[0123456789.+-eE]+");
Matcher m = p.matcher(value);

while (m.find())
Expand Down
5 changes: 3 additions & 2 deletions xsd2vdm/src/main/java/xsd2vdm/Xsd2Raw.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ else if (args.length == 2)
vdmFile.println(" * DO NOT EDIT!");
vdmFile.println(" */");
vdmFile.println("values");
int file = 1;

for (XSDElement root: roots)
{
vdmFile.print(" file" + file++ + " =\n");
String varname = root.getFile().getName().replaceAll("\\.", "_");

vdmFile.print(" " + varname + " =\n");
vdmFile.print(root.toVDM());
vdmFile.println(";\n");
}
Expand Down
2 changes: 1 addition & 1 deletion xsd2vdm/src/main/scripts/xsd2raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Script to launch the installed XSD2VDM jar with the Xsd2Raw method.
#

VERSION=1.1.3-SNAPSHOT
VERSION=1.1.4-SNAPSHOT
JAR=$HOME/.m2/repository/org/into-cps/vdmcheck/xsd2vdm/$VERSION/xsd2vdm-$VERSION.jar
JVMARGS=""
ARGS=""
Expand Down
2 changes: 1 addition & 1 deletion xsd2vdm/src/main/scripts/xsd2vdm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Script to launch the installed XSD2VDM jar.
#

VERSION=1.1.3-SNAPSHOT
VERSION=1.1.4-SNAPSHOT
JAR=$HOME/.m2/repository/org/into-cps/vdmcheck/xsd2vdm/$VERSION/xsd2vdm-$VERSION.jar
JVMARGS=""
ARGS=""
Expand Down

0 comments on commit 0b4a822

Please sign in to comment.