-
Notifications
You must be signed in to change notification settings - Fork 11
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
Preprocessor style comments (lines starting with "//") only seem to work if next character is a space #91
Comments
@RolfSander, is this still an issue or was it addressed in PR #92? Maybe I can take a look if it's still an open issue. |
The problem still exists :-( I have created a temporary branch called issue91test with several test Can you reproduce the errors? |
Hi @RolfSander, I am finally back after being away for a bit. Yes, I am able to replicate your results on my end. Also, I modified the ok1 case by adding the same comment after //This is a comment without a space after the two slashes
#MODEL small_strato
#LANGUAGE Fortran90
#DOUBLE ON
#INTEGRATOR rosenbrock
#DRIVER general
#JACOBIAN SPARSE_LU_ROW
#HESSIAN ON
#STOICMAT ON
//This is a comment without a space after the two slashes
{This is the small_strato example from Chapter 2 of the KPP manual} and I get this error: KPP is parsing the equation file.Error :issue91test_ok1.kpp:11: Extra parameter on command line '//This'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'is'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'a'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'comment'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'without'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'a'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'space'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'after'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'the'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'two'
Error :issue91test_ok1.kpp:11: Extra parameter on command line 'slashes' Then I tried: //This is a comment without a space after the two slashes
#MODEL small_strato
#LANGUAGE Fortran90
#DOUBLE ON
#INTEGRATOR rosenbrock
#DRIVER general
#JACOBIAN SPARSE_LU_ROW
#HESSIAN ON
#STOICMAT ON
//This is a comment without a space after the two slashes
// This is a comment with a space after the two slashes
{This is the small_strato example from Chapter 2 of the KPP manual} and I got the same error. I think it because it is expecting a |
@yantosca, thanks for testing this!
It is called |
@RolfSander: I took a look at <COMMENT2>[^\n]* {
} should ignore zero or more instances of any character except a newline. I tried a couple of other things but they didn't work. I may give up on this for a bit. |
As we cannot solve this problem, let's change our strategy: It's not a Comments are either enclosed between the curly braces { and }, or |
I agree! |
Preprocessor style comments (lines starting with "//") only seem to work if the next character is a space. Otherwise, I get the error message:
This needs to be fixed, probably in
scan.l
, whereCOMMENT2
is defined.The text was updated successfully, but these errors were encountered: