question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ParserVisitor fails parsing OccursTo

See original GitHub issue

Issue Description

@yruslan Based on your suggestion from https://github.com/AbsaOSS/cobrix/issues/156#issuecomment-522518017, i tried with the prepare_release_1_0_0

This version is failing (with NumberFormatException) to parse the OccursTo section of my copybook, 04 CARR-CLM-VAR-GRP. 06 NCH-EDIT-GRP OCCURS 0 TO 13 TIMES DEPENDING ON CARR-NCH-EDIT-CD-CNT. 08 NCH-EDIT-TRLR-IND-CD PIC X. 08 NCH-EDIT-CD PIC X(4).

It is trying to parse the String TO13 instead of just 13

As an alternate: I initially tried with the current release tag 0.5.6. And as pointed out in the above linked issue, the RDW is correctly decoded and all other sections are getting decoded, except for the OCCURS…DEPENDING ON… sections. It is correctly identifying the count value from CARR-NCH-EDIT-CD-CNT and adds that many number repeating groups in the output. However, all the fields in the groups are empty.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22

github_iconTop GitHub Comments

1reaction
chandrasekaravrcommented, Sep 6, 2019

@yruslan Thanks for the tip. It worked perfectly. I was using the segment_filter and segment_field` initially.

1reaction
chandrasekaravrcommented, Aug 27, 2019

An option would be great to switch between FixedLength and VariableLength.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting the line number in the ParserVisitor? - antlr
I'm trying to get line numbers for more specific error messages in my ParserVisitor (visits the parse tree generated by antlr).
Read more >
Failure Parsing Inbound Synchronous AS2 MDN - IBM
When receiving an inbound AS2 synchronous MDN, the EDIINTPipelineParse service fails with error: "Parsing failure on message"
Read more >
ParseTreeVisitor (ANTLR 4 Runtime 4.11.1 API)
This interface defines the basic notion of a parse tree visitor. ... Visit an error node, and return a user-defined result of the...
Read more >
Listeners And Visitors - Strumenta - Federico Tomassetti
Parsing Gets You a Parse Tree. The first point is understanding why we need a listener or a visitor. When you successfully parse...
Read more >
Laurence Tratt: Parsing: The Solved Problem That Isn't
Parseable, but obviously nonsensical, sentences like Bill evaporates Ben highlight this (the sentence is still noun verb noun , but finding two ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found