[x3d-public] X3D regexes for colorRGBA, image need work

Don Brutzman brutzman at nps.edu
Thu Jul 5 07:36:52 PDT 2018


Thanks for the analysis, very helpful.

Not ready yet, but I have made progress integrating the JUnit 5 test framework into X3DJSAIL testing.

Once ready, will apply the various/numerous candidate regex tests into pre-release testing.  This will not only help X3DJSAIL but also X3D XML Schema and anything else using X3D Unified Object Model (X3DUOM).



On 7/2/2018 11:10 AM, Andreas Plesch wrote:
> The default value for SFImage is '0 0 0'. It matches the provided
> regex according to:
> 
> https://regex101.com/r/TiRNeO/2
> 
> What regex engine or flavor is used for X3DJSAIL ?
> 
> Similarly, the default value for SFColorRGBA '0 0 0 0' matches the
> provided regex according to:
> 
> https://regex101.com/r/N9ZQcZ/1/tests
> 
> It appears that there are some limitations to the regex engine used
> for X3DJSAIL. In order to proceed, it will be probably necessary to
> figure out exactly how regex are interpreted with X3DJSAIL. There is
> probably documentation:
> 
> http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/fields/SFImageObject.html#pattern
> points to
> https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
> 
> Looks like it is relevant. It points to:
> 
> https://www.javatpoint.com/java-regex
> 
> which could be used for testing.
> 
> Indeed, replacing the java code in
> https://compiler.javatpoint.com/opr/test.jsp?filename=RegexExample2
> 
> with
> 
> import java.util.regex.*;
> class RegexExample2{
> public static void main(String args[]){
> System.out.println(Pattern.matches(
> "(\\d|[1-9]\\d+)(\\s+(\\d|[1-9]\\d+)){2}(\\s+((0x([a-f]|[A-F]|\\d]){1,8})|[1-9]\\d+|\\d))*",
> "0 0 0"));//true
> }}
> 
> returns true, indicating that the regex actually works. So the problem
> may be somewhere else ?
> 
> -Andreas
> 
> 
>> Message: 3
>> Date: Thu, 28 Jun 2018 20:45:02 -0700
>> From: Don Brutzman <brutzman at nps.edu>
>> To: X3D Graphics public mailing list <x3d-public at web3d.org>
>> Subject: [x3d-public] X3D regexes for colorRGBA, image need work
>> Message-ID: <dd072da5-0761-acd9-5dfb-f772a7ccd37b at nps.edu>
>> Content-Type: text/plain; charset="utf-8"; format=flowed
>>
>> Newly installed X3DJSAIL tests reveal:
>>
>> SFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 481ba2cf
>> MFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F at 12d2ce03
>> SFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 6239aba6
>> MFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I at 4f3bbf68
>>
>> Regexes can be found in schema documentation for each  Simple type at
>>
>> http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0.html
>>
>> and further documented at
>>
>> http://www.web3d.org/specifications/X3dRegularExpressions.html#SFColorRGBA
>> http://www.web3d.org/specifications/X3dRegularExpressions.html#SFImage
>>
>> Anyone want to tackle these?
>>
>> all the best, Don
>> --
>> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
>> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
>> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
>>
>>
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>>
>> ------------------------------
>>
>> End of x3d-public Digest, Vol 111, Issue 95
>> *******************************************
> 
> 
> 


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman




More information about the x3d-public mailing list