Class AbstractBasicProgramPostprocessing

    • Constructor Detail

      • AbstractBasicProgramPostprocessing

        public AbstractBasicProgramPostprocessing()
    • Method Detail

      • getSubroutineMap

        protected abstract java.util.Map<java.lang.String,​CommandSub> getSubroutineMap()
      • getFirstCommand

        protected abstract Command getFirstCommand()
      • postprocess

        public void postprocess()
                         throws AnalysisException
        Description copied from interface: BuildableProgram
        Calling this method signals that all the commands are added to the program. This method has to perform all the polishing of the built program that are to be done after the commands are analyzed. These include:
        • optimizing expressions
        • recalculating if/elseif/else/endif jumps
        • building subroutine symbol table
        • checking syntax analysis rules that apply to the whole program and are easier to implement this way than keeping different state informations during the syntax analysis, which is line oriented. For example checking that all LOCAL and GLOBAL declarations in a SUB are before any executable statement, subs are not nested...
        Specified by:
        postprocess in interface BuildableProgram
        Throws:
        AnalysisException - when the postprocessing discovers syntax errors