Comments (8)
Sure, that looks like a bug, I will try to look into it. Thanks for the report.
Things are quite busy for me workwise at the moment, and then I go on one-month leave, so it could potentially take quite a long time. In the meantime, you could try putting string delimiters around it ('%'
), which seems to work for me.
from f90nml.
Thanks for the quick response.
Yep, that's exactly what I'm doing for now.
I'm just a bit worried about other token combos biting me later!
from f90nml.
Following up on here.. (mostly for myself)
Problem appears to be L357 of parse_variable
. We rely on the appearance of those tokens (%
, (
, =
) to identify the end of the current variable and the beginning of the next variable. (This is primarily for when multiple variables, including vectors, are on a single line.)
This may be failing because it sees the %
and thinks that it's finished, and then sets the value of units
to None
.
This will probably be a bit harder to fix. For example, this namelist:
&nml x=y%z=c /
could have two interpretations:
&nml
x = 'y%'
z = 'c'
/
&nml
x =
y%z = 'c'
/
But there might be a way out of this particular situation. Your example only has one interpretation, since % would need a variable name to be interpreted as a derived type dereference.
from f90nml.
Actually I could be wrong about that example... spaces may be able to resolve the case that I mentioned, I'd need to check it out.
from f90nml.
Sorry for the long delay.
I've testd this case in gfortran and Intel fortran, and the results are similar to #43 in that gfortran rejects the namelist, and Intel fortran parses it differently (specifically it sets units
to an empty string).
Given that these non-delimited tokens don't appear to produce the strings that you need, I'm probably not likely to support these.
From what you mentioned in #43, it may be that SDDS is producing very old namelist files that don't produce meaningful output on any actively maintained compiler, so I'm inclined to close these issues as not relevant. It might be more constructive to lean on SDDS to produce syntatically correct namelists rather than supporting incorrect namelists.
I could possibly support this case with a control flag or something that relaxes the parsing rules, but these are very hard edge cases to support, and I don't think I would be able to prioritise them.
from f90nml.
I'm going to close this ticket, due to the lack of support for these values in gfortran and Intel fortran, the only compilers available to me. If you can find a compiler which supports these values, or just feel like this is an urgent and unsolvable problem for you, then feel free to re-open this and we can talk about a plan. But I probably won't personally be able to devote much time to this one, sorry.
from f90nml.
Reopening, but explicitly noting this is an SDDS issue.
from f90nml.
As in #43 this is probably too big a challenge to implement unless its strongly driven by user feedback, so will close for now. Please re-open in the future if necessary.
from f90nml.
Related Issues (20)
- Namelist parsed successfully despite error when using in an application HOT 6
- Cannot pop Cogroup HOT 4
- Write fail when an empty list is provided HOT 3
- Bug reading mixed lists in version 1.4.0 HOT 6
- del with upper case not working in versions > 1.3.1 HOT 4
- Problem writing out read-in lists in version 1.4.2 HOT 4
- Keep case sensitive names for variables and groups HOT 3
- Improved f90nml parsing error messaging HOT 3
- Assertion errors with ill-valued namelist
- patching of fortran types only works for first occurence HOT 5
- patching a repeated section on a namelist returns an unclear message HOT 17
- Include a diff and update methods for namelists HOT 2
- f90nml without the -p option makes the transformed namelist unusable HOT 6
- f90nml does not parse WRF namelist files at all HOT 5
- Multiple Namelists in CLI HOT 1
- Namelist variable stays as single int/float value with comma HOT 2
- Patching an array with assignment on multiple lines corrupts the output file HOT 1
- Reducing permissiveness of parser HOT 5
- No spaces before comments results in a string, rather than the intended type HOT 2
- Support MOM6 parameter files? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from f90nml.