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

Parse error for numeric constant with leading zero #98

Open
jtbandes opened this issue Jul 17, 2021 · 0 comments
Open

Parse error for numeric constant with leading zero #98

jtbandes opened this issue Jul 17, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jtbandes
Copy link
Contributor

A user reported this in the Webviz Slack workspace.

Certain msg definitions (example kobuki_msgs/VersionInfo) have numeric constant with some leading zeros: uint64 SMOOTH_MOVE_START = 0000000000000001

ROS seems to handle this fine, but rosbag.js throws an error when trying to parse the constant, because JSON.parse throws. (@foxglove/rosmsg does handle it correctly, although I don't think we were aware of this bug/limitation when we wrote it.)

@jtbandes jtbandes added the bug Something isn't working label Jul 17, 2021
jtbandes added a commit to foxglove/rosmsg that referenced this issue Jul 17, 2021
When the parser was converted to Nearley this happened to fix a bug present in rosbag.js: cruise-automation/rosbag.js#98

Add a test case to prevent future accidental regressions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant