org.apache.sysds.parser

## Class ParserWrapper

- java.lang.Object
- - org.apache.sysds.parser.ParserWrapper

- Direct Known Subclasses:
    DMLParserWrapper

      public abstract class ParserWrapper
      extends Object

  Base class for all dml parsers in order to make the various compilation chains independent of the used parser.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParserWrapper()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<CustomErrorListener.ParseIssue>` | `getParseIssues()`
    `static StatementBlock` | `getStatementBlock(Statement current)` Custom wrapper to convert statement into statement blocks.
    `boolean` | `isAtLeastOneError()`
    `boolean` | `isAtLeastOneWarning()`
    `abstract DMLProgram` | `parse(String fileName, String dmlScript, Map<String,String> argVals)`
    `static String` | `readDMLScript(String script, org.apache.commons.logging.Log LOG)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ParserWrapper

          public ParserWrapper()

  - ### Method Detail

    - #### parse

          public abstract DMLProgram parse(String fileName,
                                           String dmlScript,
                                           Map<String,String> argVals)

    - #### getStatementBlock

          public static StatementBlock getStatementBlock(Statement current)

      Custom wrapper to convert statement into statement blocks. Called by doParse and in DmlSyntacticValidator for for, parfor, while, ...
      Parameters:
        `current` - a statement
      Returns:
        corresponding statement block

    - #### readDMLScript

          public static String readDMLScript(String script,
                                             org.apache.commons.logging.Log LOG)
                                      throws IOException,
                                             LanguageException

      Throws:
        `IOException`
        `LanguageException`

    - #### isAtLeastOneError

          public boolean isAtLeastOneError()

    - #### isAtLeastOneWarning

          public boolean isAtLeastOneWarning()

    - #### getParseIssues

          public List<CustomErrorListener.ParseIssue> getParseIssues()

Copyright © 2020 The Apache Software Foundation. All rights reserved.