AbsaOSS / cobrix

A COBOL parser and Mainframe/EBCDIC data source for Apache Spark
Apache License 2.0
135 stars 80 forks source link

Simplify hierarchical traversal #208

Open yruslan opened 4 years ago

yruslan commented 4 years ago

Background

Currently, the hierarchical records generator uses a lot of auxiliary arrays, maps, etc. Maybe if the parser could specify child segments for segment redefines instead of setting parent segment for child segment redefines the traversal could be simplified.

Feature

Investigate if hierarchical traversal can be simplified.

Additional context

tr11 commented 4 years ago

Wondering what's the best way to proceed here. I can rewrite and refactor the parser as needed so we can also add some of the other features (variable arrays, custom occurs handlers, etc).

What are the parser features we'd need for this?

yruslan commented 4 years ago

Thanks for offering help on the parser. But this issue (#208) is more related to #33. The reconstruction of hierarchical records feature is not currently used much so it is not of a high priority. And it does not affect the parser, only AST and hierarchical records traversal. So putting it to the icebox for now.

The variable arrays for records without RDWs is something that I'm going to start work on soon.

By custom occurs handlers you mean #151, right? Let's revisit it once #239 is done.