# Path: AOR/BasicStatement.py
# class BasicNamedStatement(BasicStatement):
# 
#     def __init__(self, sLabel=None, sName=None, loc=None, nIndent=0,
#                  isDeclaration=1):
#         self.sName=sName
#         BasicStatement.__init__(self, sLabel, loc, nIndent,
#                                 isDeclaration=isDeclaration)
#     # --------------------------------------------------------------------------
#     def SetName(self, s): self.sName=s
#     # --------------------------------------------------------------------------
#     def NameIs(self, s):
#         return self.sName and string.upper(self.sName) == string.upper(s)
#     # --------------------------------------------------------------------------
#     def GetName(self): return self.sName
#     # --------------------------------------------------------------------------
#     def ToList(self, stylesheet, l, bAddSpace=0):
#         BasicStatement.ToList(self, stylesheet, l)
#         if self.sName:
#             if bAddSpace:
#                 l.append(self.sName,nIndentNext=1)
#             else:
#                 l.append(self.sName)
# 
# class BasicStatement(Label, Location):
# 
#     def __init__(self, sLabel=None, loc=None, nIndent=0, isDeclaration=1):
#         Label.__init__(self, sLabel)
#         Location.__init__(self, loc)
#         self._isDeclaration=isDeclaration
#         self.nIndent=nIndent
#     # --------------------------------------------------------------------------
#     def isA(self, c):
#         return self.__class__ == c
#     # --------------------------------------------------------------------------
#     # Returns true if the statement is a 'real' fortran statement (as opposed to
#     # a compiler directive, comment line, preprocessor directive). This method
#     # is overwritten in those classes.
#     def isStatement(self): return 1
#     # --------------------------------------------------------------------------
#     # Returns if this statement is a declaration statement or not
#     def isDeclaration(self): return self._isDeclaration
#     # --------------------------------------------------------------------------
#     def ToString(self, stylesheet): return stylesheet.ToString(self)
#     # --------------------------------------------------------------------------
#     def GetIndentation(self): return self.nIndent
#     # --------------------------------------------------------------------------
#     def GetVarUsage(self, varUsage, sType="", obj=None, loc=None): return
#     # --------------------------------------------------------------------------
#     def ToList(self, stylesheet, l):
#         Label.ToList(self, stylesheet, l)
#         l.append(stylesheet.GetIndentation(self))
#     # --------------------------------------------------------------------------
#     def __str__(self): return self.__repr__()
#     # --------------------------------------------------------------------------
#     def __repr__(self):
#         stylesheet = DefaultStylesheet()
#         return "%s%s"%(Label.__repr__(self),
#                        "".join(stylesheet.ToString(self)))


import string
from   AOR.BasicStatement import BasicNamedStatement, BasicStatement
    from AOR.Test.DoTest import RunTest
#!/usr/bin/env python



class ControlLessDo(BasicNamedStatement):
    # Stores a Do loop without loop control
    def __init__(self, sLabel=None, sName=None, loc=None,
                 sDo="DO", sDoLabel=None, nIndent=0):
        self.sDo       = sDo
        self.sDoLabel  = sDoLabel
        self.lLoopData = []
        BasicNamedStatement.__init__(self, sLabel, sName, loc, nIndent,
                                     isDeclaration=0)
    # --------------------------------------------------------------------------
    def GetVarUsage(self, varUsage): return
    # --------------------------------------------------------------------------
    def ToList(self, stylesheet, l):
        BasicNamedStatement.ToList(self, stylesheet, l)
        l.append(stylesheet.sKeyword(self.sDo))
        if self.sDoLabel:
            l.append(self.sDoLabel, nIndent=1)
# ==============================================================================
# Exit statement
class Exit(BasicStatement):
    def __init__(self, sLabel=None, loc=None, sExit="EXIT", sExitLabel=None,
                 nIndent=0):

# Path: AOR/BasicStatement.py
# class BasicNamedStatement(BasicStatement):
# 
#     def __init__(self, sLabel=None, sName=None, loc=None, nIndent=0,
#                  isDeclaration=1):
#         self.sName=sName
#         BasicStatement.__init__(self, sLabel, loc, nIndent,
#                                 isDeclaration=isDeclaration)
#     # --------------------------------------------------------------------------
#     def SetName(self, s): self.sName=s
#     # --------------------------------------------------------------------------
#     def NameIs(self, s):
#         return self.sName and string.upper(self.sName) == string.upper(s)
#     # --------------------------------------------------------------------------
#     def GetName(self): return self.sName
#     # --------------------------------------------------------------------------
#     def ToList(self, stylesheet, l, bAddSpace=0):
#         BasicStatement.ToList(self, stylesheet, l)
#         if self.sName:
#             if bAddSpace:
#                 l.append(self.sName,nIndentNext=1)
#             else:
#                 l.append(self.sName)
# 
# class BasicStatement(Label, Location):
# 
#     def __init__(self, sLabel=None, loc=None, nIndent=0, isDeclaration=1):
#         Label.__init__(self, sLabel)
#         Location.__init__(self, loc)
#         self._isDeclaration=isDeclaration
#         self.nIndent=nIndent
#     # --------------------------------------------------------------------------
#     def isA(self, c):
#         return self.__class__ == c
#     # --------------------------------------------------------------------------
#     # Returns true if the statement is a 'real' fortran statement (as opposed to
#     # a compiler directive, comment line, preprocessor directive). This method
#     # is overwritten in those classes.
#     def isStatement(self): return 1
#     # --------------------------------------------------------------------------
#     # Returns if this statement is a declaration statement or not
#     def isDeclaration(self): return self._isDeclaration
#     # --------------------------------------------------------------------------
#     def ToString(self, stylesheet): return stylesheet.ToString(self)
#     # --------------------------------------------------------------------------
#     def GetIndentation(self): return self.nIndent
#     # --------------------------------------------------------------------------
#     def GetVarUsage(self, varUsage, sType="", obj=None, loc=None): return
#     # --------------------------------------------------------------------------
#     def ToList(self, stylesheet, l):
#         Label.ToList(self, stylesheet, l)
#         l.append(stylesheet.GetIndentation(self))
#     # --------------------------------------------------------------------------
#     def __str__(self): return self.__repr__()
#     # --------------------------------------------------------------------------
#     def __repr__(self):
#         stylesheet = DefaultStylesheet()
#         return "%s%s"%(Label.__repr__(self),
#                        "".join(stylesheet.ToString(self)))


# Path: AOR/Do.py
import string
from   AOR.BasicStatement import BasicNamedStatement, BasicStatement
    from AOR.Test.DoTest import RunTest

#!/usr/bin/env python



class ControlLessDo(BasicNamedStatement):
    # Stores a Do loop without loop control
    def __init__(self, sLabel=None, sName=None, loc=None,
                 sDo="DO", sDoLabel=None, nIndent=0):
        self.sDo       = sDo
        self.sDoLabel  = sDoLabel
        self.lLoopData = []
        BasicNamedStatement.__init__(self, sLabel, sName, loc, nIndent,
                                     isDeclaration=0)
    # --------------------------------------------------------------------------
    def GetVarUsage(self, varUsage): return
    # --------------------------------------------------------------------------
    def ToList(self, stylesheet, l):
        BasicNamedStatement.ToList(self, stylesheet, l)
        l.append(stylesheet.sKeyword(self.sDo))
        if self.sDoLabel:
            l.append(self.sDoLabel, nIndent=1)
# ==============================================================================
# Exit statement
class Exit(BasicStatement):
    def __init__(self, sLabel=None, loc=None, sExit="EXIT", sExitLabel=None,
                 nIndent=0):

        BasicStatement.__init__(self, sLabel, loc, nIndent, isDeclaration=0)