May-20-2022, 10:05 AM
(This post was last modified: May-20-2022, 10:06 AM by Gribouillis.)
(May-19-2022, 10:40 PM)Skaperen Wrote: is there a tool to create that which i could use (Python 3.6,Ubuntu 18.04, Firefox 100)?I created the image by using a tool named jsyntrax. Unfortunately, it does not parse the regular expression, so I had to write my interpretation of the regular expression in a .spec file
indentstack( 10, line( opt(choice('+', '-')), loop(None, ' '), choice( line( loop('0-9', None), opt(line('.', loop(None, '0-9')))), line('.', loop('0-9', None)))), opt( line( choice('e','E'), opt(choice('+', '-')), loop('0-9', None))))jsyntrax runs on java. The only thing to do is to dowload the zip file, uncompress and run. There is also a Python syntrax module on pypi, but it seems abandoned by the author who switched to Java because of multiplatform concerns. I had an exception while trying to use Python's syntrax module. I don't want this module to die, I think I'm going to fork my own version.
It should not be too difficult to write a regex parser to convert a regular expression to such a diagram. I have already used Syntrax for a parsing project and it worked well. Perhaps I'll do it when I find some time to do so.