Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on optional loops #6

Open
arkanovicz opened this issue Jan 31, 2020 · 1 comment
Open

Error on optional loops #6

arkanovicz opened this issue Jan 31, 2020 · 1 comment

Comments

@arkanovicz
Copy link

On the following spec file:

opt(loop('A',None))

syntrax 1.0 throws:

Rendering to test.png using cairo backend
Traceback (most recent call last):
  File "/usr/local/bin/syntrax", line 11, in <module>
    load_entry_point('syntrax==1.0', 'console_scripts', 'syntrax')()
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 2028, in main
    render_railroad(spec, args.title, url_map, args.output, backend, styles, args.scale, args.transparent)
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 1747, in render_railroad
    layout.draw_diagram(spec)
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 1678, in draw_diagram
    return self.draw_line(spec[1:])
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 1287, in draw_line
    t, texx, texy = self.draw_diagram(term) # Draw each element
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 1695, in draw_diagram
    return self.draw_or([None, args])
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 1604, in draw_or
    m[i] = mx = self.draw_diagram(term)
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 1673, in draw_diagram
    return self.draw_bubble(spec[0])
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 1206, in draw_bubble
    txt, node_style = self.format_text(txt)
  File "/usr/local/lib/python2.7/dist-packages/syntrax.py", line 1182, in format_text
    if re.match(ns.pattern, txt):
  File "/usr/lib/python2.7/re.py", line 141, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer
@inponomarev
Copy link

It seems that this project is dead.

You may try jsyntrax instead: this is a fresh reimplementation of syntrax in Java.

jsyntrax 1.1 is free from this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants