Class EclRecordReader

  • All Implemented Interfaces:
    org.antlr.v4.runtime.tree.ParseTreeListener, org.hpccsystems.ws.client.antlr.gen.EclRecordListener

    public class EclRecordReader
    extends org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
    This class reads ECL and converts it to an EclInfo object. Currently it processes RECORD definitions only.
    • Constructor Summary

      Constructors 
      Constructor Description
      EclRecordReader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void enterAnnotation​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.AnnotationContext ctx)
      Enter a parse tree produced by EclRecordParser.annotation().
      void enterBlob​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.BlobContext ctx)
      Enter a parse tree produced by EclRecordParser.blob().
      void enterComment​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.CommentContext ctx)
      Enter a parse tree produced by EclRecordParser.comment().
      void enterDefaultval​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.DefaultvalContext ctx)
      Enter a parse tree produced by EclRecordParser.defaultval().
      void enterDefined_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Defined_record_defContext ctx)
      Enter a parse tree produced by EclRecordParser.defined_record_def().
      void enterEclfield_decl​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Eclfield_declContext ctx)
      Enter a parse tree produced by EclRecordParser.eclfield_decl().
      void enterExploded_dataset_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Exploded_dataset_record_defContext ctx)
      Enter a parse tree produced by EclRecordParser.exploded_dataset_record_def().
      void enterInline_dataset_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Inline_dataset_record_defContext ctx)
      Enter a parse tree produced by EclRecordParser.inline_dataset_record_def().
      void enterMaxcount​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.MaxcountContext ctx)
      Enter a parse tree produced by EclRecordParser.maxcount().
      void enterMaxlength​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.MaxlengthContext ctx)
      Enter a parse tree produced by EclRecordParser.maxlength().
      void enterNested_dataset_decl​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Nested_dataset_declContext ctx)
      Enter a parse tree produced by EclRecordParser.nested_dataset_decl().
      void enterNested_inline_dataset_decl​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Nested_inline_dataset_declContext ctx)
      Enter a parse tree produced by EclRecordParser.nested_inline_dataset_decl().
      void enterRecord_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Record_defContext ctx)
      Enter a parse tree produced by EclRecordParser.record_def().
      void enterRecord_def_inline​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Record_def_inlineContext ctx)
      Enter a parse tree produced by EclRecordParser.record_def_inline().
      void enterXmldefaultval​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.XmldefaultvalContext ctx)
      Enter a parse tree produced by EclRecordParser.xmldefaultval().
      void enterXpath​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.XpathContext ctx)
      Enter a parse tree produced by EclRecordParser.xpath().
      void exitAnnotation​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.AnnotationContext ctx)
      Exit a parse tree produced by EclRecordParser.annotation().
      void exitAnnotation_name​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Annotation_nameContext ctx)
      Exit a parse tree produced by EclRecordParser.annotation_name().
      void exitAnnotation_param​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Annotation_paramContext ctx)
      Exit a parse tree produced by EclRecordParser.annotation_param().
      void exitComment​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.CommentContext ctx)
      Exit a parse tree produced by EclRecordParser.comment().
      void exitEclfield_decl​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Eclfield_declContext ctx)
      Exit a parse tree produced by EclRecordParser.eclfield_decl().
      void exitExploded_dataset_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Exploded_dataset_record_defContext ctx)
      Exit a parse tree produced by EclRecordParser.exploded_dataset_record_def().
      void exitInline_dataset_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Inline_dataset_record_defContext ctx)
      Exit a parse tree produced by EclRecordParser.inline_dataset_record_def().
      void exitRecord_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Record_defContext ctx)
      Exit a parse tree produced by EclRecordParser.record_def().
      void exitRecord_def_inline​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Record_def_inlineContext ctx)
      Exit a parse tree produced by EclRecordParser.record_def_inline().
      EclRecordWrapper getEclRecordWrapper()  
      ErrorListener getErrorHandler()  
      org.hpccsystems.ws.client.antlr.gen.EclRecordParser getParser()  
      void setParser​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser parser)  
      • Methods inherited from class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener

        enterAnnotation_arguments, enterAnnotation_name, enterAnnotation_param, enterAssign, enterAssign_list, enterEclfield_name, enterEclfield_recref, enterEclfield_type, enterEveryRule, enterOpt, enterOpts, enterPayload_sep, enterProgram, enterRecord_defs, enterToken_list, enterValue, enterValue_list, exitAnnotation_arguments, exitAssign, exitAssign_list, exitBlob, exitDefaultval, exitDefined_record_def, exitEclfield_name, exitEclfield_recref, exitEclfield_type, exitEveryRule, exitMaxcount, exitMaxlength, exitNested_dataset_decl, exitNested_inline_dataset_decl, exitOpt, exitOpts, exitPayload_sep, exitProgram, exitRecord_defs, exitToken_list, exitValue, exitValue_list, exitXmldefaultval, exitXpath, visitErrorNode, visitTerminal
    • Constructor Detail

      • EclRecordReader

        public EclRecordReader()
    • Method Detail

      • enterRecord_def_inline

        public void enterRecord_def_inline​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Record_def_inlineContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Enter a parse tree produced by EclRecordParser.record_def_inline().

        The default implementation does nothing.

        Specified by:
        enterRecord_def_inline in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterRecord_def_inline in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitRecord_def_inline

        public void exitRecord_def_inline​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Record_def_inlineContext ctx)
        Exit a parse tree produced by EclRecordParser.record_def_inline().

        The default implementation does nothing.

        When exiting a defined recordset (l_layout:=RECORD...), add the generated object to the EclInfo's recordset collection.

        Specified by:
        exitRecord_def_inline in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitRecord_def_inline in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterRecord_def

        public void enterRecord_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Record_defContext ctx)
        Enter a parse tree produced by EclRecordParser.record_def().

        The default implementation does nothing.

        When entering a RECORD ecl definition, create a RecordDef object and add it to the EclInfo container.

        Specified by:
        enterRecord_def in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterRecord_def in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitRecord_def

        public void exitRecord_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Record_defContext ctx)
        Exit a parse tree produced by EclRecordParser.record_def().

        The default implementation does nothing.

        When exiting a RECORD definition, Set the current record object to null

        Specified by:
        exitRecord_def in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitRecord_def in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterDefined_record_def

        public void enterDefined_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Defined_record_defContext ctx)
        Enter a parse tree produced by EclRecordParser.defined_record_def().

        The default implementation does nothing.

        when entering a defined record def (l_rec:=RECORD...), set the currentrec to a new DFURecordDefInfo object and set the record name to l_rec, etc.

        Specified by:
        enterDefined_record_def in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterDefined_record_def in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterEclfield_decl

        public void enterEclfield_decl​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Eclfield_declContext ctx)
        Enter a parse tree produced by EclRecordParser.eclfield_decl().

        The default implementation does nothing.

        when entering a field in a RECORD layout definition, set the currentfield object to a new DFUDataColumnInfo object

        Specified by:
        enterEclfield_decl in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterEclfield_decl in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitEclfield_decl

        public void exitEclfield_decl​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Eclfield_declContext ctx)
        Exit a parse tree produced by EclRecordParser.eclfield_decl().

        The default implementation does nothing.

        When exiting a field definition in a RECORD descriptor, set the field type and name and add the field to the current record's collection of child DFUDataColumnInfo objects. Also handle child datasets, both with inline dataset references ( field1:=DATASET({STRING field2,STRING field3}) and references to external datasets ( field1:=DATASET(l_kidrec);

        Specified by:
        exitEclfield_decl in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitEclfield_decl in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterMaxcount

        public void enterMaxcount​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.MaxcountContext ctx)
        Enter a parse tree produced by EclRecordParser.maxcount().

        The default implementation does nothing.

        if a MAXCOUNT option is encountered, add it to the current field/record being processed

        Specified by:
        enterMaxcount in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterMaxcount in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterBlob

        public void enterBlob​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.BlobContext ctx)
        Enter a parse tree produced by EclRecordParser.blob().

        The default implementation does nothing.

        if a MAXCOUNT option is encountered, add it to the current field/record being processed

        Specified by:
        enterBlob in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterBlob in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterNested_dataset_decl

        public void enterNested_dataset_decl​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Nested_dataset_declContext ctx)
        Enter a parse tree produced by EclRecordParser.nested_dataset_decl().

        The default implementation does nothing.

        When entering a child dataset definition in a RECORD layout, (field1:=DATASET(l_rec);) look for an exiting record layout matching the dataset type of the child dataset and add its fields as child fields of the current dataset field.

        Specified by:
        enterNested_dataset_decl in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterNested_dataset_decl in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterNested_inline_dataset_decl

        public void enterNested_inline_dataset_decl​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Nested_inline_dataset_declContext ctx)
        Enter a parse tree produced by EclRecordParser.nested_inline_dataset_decl().

        The default implementation does nothing.

        When entering a child dataset definition in a RECORD layout with an inline record def, set the current child dataset record's inline property to true

        Specified by:
        enterNested_inline_dataset_decl in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterNested_inline_dataset_decl in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterInline_dataset_record_def

        public void enterInline_dataset_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Inline_dataset_record_defContext ctx)
        Enter a parse tree produced by EclRecordParser.inline_dataset_record_def().

        The default implementation does nothing.

        When entering a child dataset's inline record def ( {string val, string val2} in a field defined like field1:=DATASET({string val,string val2}), set the current record to the parent record and initialize a new record to hold the child record values

        Specified by:
        enterInline_dataset_record_def in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterInline_dataset_record_def in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterExploded_dataset_record_def

        public void enterExploded_dataset_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Exploded_dataset_record_defContext ctx)
        Enter a parse tree produced by EclRecordParser.exploded_dataset_record_def().

        The default implementation does nothing.

        When entering a child dataset's inline record def ( {string val, string val2} in a field defined like field1:=DATASET({string val,string val2}), set the current record to the parent record and initialize a new record to hold the child record values

        Specified by:
        enterExploded_dataset_record_def in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterExploded_dataset_record_def in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitInline_dataset_record_def

        public void exitInline_dataset_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Inline_dataset_record_defContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Exit a parse tree produced by EclRecordParser.inline_dataset_record_def().

        The default implementation does nothing.

        Specified by:
        exitInline_dataset_record_def in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitInline_dataset_record_def in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitExploded_dataset_record_def

        public void exitExploded_dataset_record_def​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Exploded_dataset_record_defContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Exit a parse tree produced by EclRecordParser.exploded_dataset_record_def().

        The default implementation does nothing.

        Specified by:
        exitExploded_dataset_record_def in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitExploded_dataset_record_def in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterMaxlength

        public void enterMaxlength​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.MaxlengthContext ctx)
        Enter a parse tree produced by EclRecordParser.maxlength().

        The default implementation does nothing.

        When entering a MAXLENGTH option, add its value to the current field or rec

        Specified by:
        enterMaxlength in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterMaxlength in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • getParser

        public org.hpccsystems.ws.client.antlr.gen.EclRecordParser getParser()
      • setParser

        public void setParser​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser parser)
      • enterDefaultval

        public void enterDefaultval​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.DefaultvalContext ctx)
        Enter a parse tree produced by EclRecordParser.defaultval().

        The default implementation does nothing.

        When entering a DEFAULT option, set the columnvalue of the current field/rec to its value

        Specified by:
        enterDefaultval in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterDefaultval in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterXpath

        public void enterXpath​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.XpathContext ctx)
        Enter a parse tree produced by EclRecordParser.xpath().

        The default implementation does nothing.

        When entering an xpath option, add it to the current field or record

        Specified by:
        enterXpath in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterXpath in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterXmldefaultval

        public void enterXmldefaultval​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.XmldefaultvalContext ctx)
        Enter a parse tree produced by EclRecordParser.xmldefaultval().

        The default implementation does nothing.

        When entering an xmldefault option, add it to the current field or record

        Specified by:
        enterXmldefaultval in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterXmldefaultval in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterComment

        public void enterComment​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.CommentContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Enter a parse tree produced by EclRecordParser.comment().

        The default implementation does nothing.

        Specified by:
        enterComment in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterComment in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitAnnotation

        public void exitAnnotation​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.AnnotationContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Exit a parse tree produced by EclRecordParser.annotation().

        The default implementation does nothing.

        Specified by:
        exitAnnotation in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitAnnotation in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitAnnotation_name

        public void exitAnnotation_name​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Annotation_nameContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Exit a parse tree produced by EclRecordParser.annotation_name().

        The default implementation does nothing.

        Specified by:
        exitAnnotation_name in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitAnnotation_name in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitAnnotation_param

        public void exitAnnotation_param​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.Annotation_paramContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Exit a parse tree produced by EclRecordParser.annotation_param().

        The default implementation does nothing.

        Specified by:
        exitAnnotation_param in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitAnnotation_param in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • exitComment

        public void exitComment​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.CommentContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Exit a parse tree produced by EclRecordParser.comment().

        The default implementation does nothing.

        Specified by:
        exitComment in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        exitComment in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree
      • enterAnnotation

        public void enterAnnotation​(org.hpccsystems.ws.client.antlr.gen.EclRecordParser.AnnotationContext ctx)
        Description copied from class: org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Enter a parse tree produced by EclRecordParser.annotation().

        The default implementation does nothing.

        Specified by:
        enterAnnotation in interface org.hpccsystems.ws.client.antlr.gen.EclRecordListener
        Overrides:
        enterAnnotation in class org.hpccsystems.ws.client.antlr.gen.EclRecordBaseListener
        Parameters:
        ctx - the parse tree