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

partial fix for CPP14.g4 Stringliteral concatenation #1289

Closed
Xyrio opened this issue Nov 3, 2018 · 2 comments
Closed

partial fix for CPP14.g4 Stringliteral concatenation #1289

Xyrio opened this issue Nov 3, 2018 · 2 comments
Labels

Comments

@Xyrio
Copy link

Xyrio commented Nov 3, 2018

this is correct code that fails with current grammar: cout << "hello " "world";
example: https://ideone.com/aRPTIT

#include <iostream>
using namespace std;
 
int main() {
	//example a
	cout << "hello " "world" 
	"s" << endl;
	//example b
	cout << "hello " "world" \
	"s" << endl;
	return 0;
}

example a is not corrected but it should work too instead error is:
line 9:26 token recognition error at: '\\r'

i corrected example b like the following
file CPP14.g4 line 2068:
before:
| Stringliteral
after:
| Stringliteral+

@Xyrio Xyrio changed the title fix for CPP14.g4 Stringliteral concatenation partial fix for CPP14.g4 Stringliteral concatenation Nov 3, 2018
@KvanTTT KvanTTT added the cpp label Nov 3, 2018
@teverett
Copy link
Member

teverett commented Nov 7, 2018

Please submit a PR

teverett added a commit to teverett/grammars-v4 that referenced this issue Dec 26, 2018
teverett added a commit that referenced this issue Dec 27, 2018
@teverett
Copy link
Member

PR #1328

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

No branches or pull requests

3 participants