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

Divergence from grammar defined by POSIX #48

Closed
oguz-ismail opened this issue Nov 22, 2021 · 5 comments
Closed

Divergence from grammar defined by POSIX #48

oguz-ismail opened this issue Nov 22, 2021 · 5 comments

Comments

@oguz-ismail
Copy link

Observe:

$ bc -s <<x
define a(){
}define b(){
}
x

Parse error: bad token
    <stdin>:2

$ bc -s <<x
define a(){
};define b(){
}
x
$

As per POSIX, the first one should work fine, and the second should fail as a newline is required after a semicolon_list production. No other bc implementation exhibits this behavior except busybox bc, which is a fork of this one if I recall correctly.

@gavinhoward
Copy link
Owner

This has (hopefully) been fixed in commits 5b2fe30, 81f838f, and 9ffdd5e.

Could you please pull down those commits and test? If they work, I'll release an update soon.

@gavinhoward
Copy link
Owner

Oh, I meant to say that I looked at the standard, and I agree with you on the interpretation of it.

@oguz-ismail
Copy link
Author

@gavinhoward Yeah, it works fine now. Thanks for the fix

@gavinhoward
Copy link
Owner

Thank you!

I'll run my release process and put out 5.2.1 as soon as it passes.

@gavinhoward
Copy link
Owner

5.2.1 is out. I believe that solves this issue, so I am going to close. Feel free to reopen if you need to.

Thank you for your report!

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