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

jnml doesn't like unprettified LEMS code #2

Closed
epiasini opened this issue Apr 30, 2013 · 2 comments
Closed

jnml doesn't like unprettified LEMS code #2

epiasini opened this issue Apr 30, 2013 · 2 comments

Comments

@epiasini
Copy link
Member

@pgleeson The following, as far as I understand, should be valid LEMS code:

<Lems><Target component="sim1" /><Include file="Cells.xml" /><Include file="Networks.xml" /><Include file="Simulation.xml" /><iafCell id="iaf" leakConductance="0.2nS" leakReversal="-53mV" thresh="-55mV" reset="-70mV" C="3.2pF"/><network id="net1"><population id="iafPop" component="iaf" size="1" /></network><Simulation id="sim1" length="300ms" step="0.01ms" target="net1"/></Lems>

but my jnml is having some problem with parsing it, as if I save it to a file and execute it I get an error about lems not finding the "sim1" component.

As a reference, I can run just fine the same file if I prettify it:

<Lems>
    <Target component="sim1" />
    <Include file="Cells.xml" />
    <Include file="Networks.xml" />
    <Include file="Simulation.xml" />
    <iafCell id="iaf" leakConductance="0.2nS" leakReversal="-53mV"
         thresh="-55mV" reset="-70mV" C="3.2pF"/>
    <network id="net1">
    <population id="iafPop" component="iaf" size="1" />
    </network>
    <Simulation id="sim1" length="300ms" step="0.01ms" target="net1"/>
</Lems>

This is especially annoying when using machine-generated lems code (which has no reason to have newlines etc).

@pgleeson pgleeson added this to the NeuroML2 beta4 milestone Sep 10, 2014
@pgleeson
Copy link
Member

Still an error... Will try to get to the bottom of this when I'm importing code from jLEMSDev into jLEMS...

sanjayankur31 added a commit to sanjayankur31/jLEMS that referenced this issue Jun 15, 2021
When two tags are closed successively, for example:
`</OutputFile></Simulation>`, the pointer `iwk` should be moved forward
only by `tg.length() + 1` so that it arrives on the next `<`:

```

IWK
  |
</OutputFile></Simulation>

           IWK
             |
</OutputFile></Simulation>
```

If it is moved by `tg.length() + 2`, it misses the `<` and so does not
recognise the next tag at all.

Fixes NeuroML/jNeuroML#2
Fixes NeuroML/pyNeuroML#100
Fixes LEMS#40
sanjayankur31 added a commit to sanjayankur31/jLEMS that referenced this issue Jun 15, 2021
When two tags are closed successively, for example:
`</OutputFile></Simulation>`, the pointer `iwk` should be moved forward
only by `tg.length() + 1` so that it arrives on the next `<`:

```

IWK
  |
</OutputFile></Simulation>

           IWK
             |
</OutputFile></Simulation>
```

If it is moved by `tg.length() + 2`, it misses the `<` and so does not
recognise the next tag at all.

Fixes NeuroML/jNeuroML#2
Fixes NeuroML/pyNeuroML#100
Fixes LEMS#40
@sanjayankur31
Copy link
Member

PR pending in jLEMS, closing this ticket here. Primary issue: LEMS/jLEMS#40

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

3 participants