com.io7m.jpra.compiler.core.parser

## Class JPRAParser

- java.lang.Object
- - com.io7m.jpra.compiler.core.parser.JPRAParser

- All Implemented Interfaces:
    JPRAParserType

      public final class JPRAParser
      extends Object
      implements JPRAParserType

  The default implementation of the `JPRAParserType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JPRAParserType` | `newParser(com.io7m.jsx.serializer.JSXSerializerType serial, JPRAReferenceParserType ref_parser)`
    `void` | `parseEOF(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> lex)` EOF has been encountered.
    `SizeExprType<Unresolved,Untyped>` | `parseSizeExpression(com.io7m.jsx.SExpressionType e)` Parse a size expression.
    `StatementType<Unresolved,Untyped>` | `parseStatement(com.io7m.jsx.SExpressionType expr)` Parse a statement.
    `TypeExprType<Unresolved,Untyped>` | `parseTypeExpression(com.io7m.jsx.SExpressionType expr)` Parse a type expression.

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

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

- - ### Method Detail

    - #### newParser

          public static JPRAParserType newParser(com.io7m.jsx.serializer.JSXSerializerType serial,
                                                 JPRAReferenceParserType ref_parser)

      Parameters:
        `serial` - A serializer for error messages
        `ref_parser` - A reference parser
      Returns:
        A new parser

    - #### parseStatement

          public StatementType<Unresolved,Untyped> parseStatement(com.io7m.jsx.SExpressionType expr)
                                                           throws JPRACompilerParseException

      Description copied from interface: `JPRAParserType`
      Parse a statement.
      Specified by:
        `parseStatement` in interface `JPRAParserType`
      Parameters:
        `expr` - The input expression
      Returns:
        A statement
      Throws:
        `JPRACompilerParseException` - On parse errors

    - #### parseTypeExpression

          public TypeExprType<Unresolved,Untyped> parseTypeExpression(com.io7m.jsx.SExpressionType expr)
                                                               throws JPRACompilerParseException

      Description copied from interface: `JPRAParserType`
      Parse a type expression.
      Specified by:
        `parseTypeExpression` in interface `JPRAParserType`
      Parameters:
        `expr` - The input expression
      Returns:
        A type expression
      Throws:
        `JPRACompilerParseException` - On parse errors

    - #### parseSizeExpression

          public SizeExprType<Unresolved,Untyped> parseSizeExpression(com.io7m.jsx.SExpressionType e)
                                                               throws JPRACompilerParseException

      Description copied from interface: `JPRAParserType`
      Parse a size expression.
      Specified by:
        `parseSizeExpression` in interface `JPRAParserType`
      Parameters:
        `e` - The input expression
      Returns:
        A type expression
      Throws:
        `JPRACompilerParseException` - On parse errors

    - #### parseEOF

          public void parseEOF(Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> lex)
                        throws JPRACompilerParseException

      Description copied from interface: `JPRAParserType`
      EOF has been encountered.
      Specified by:
        `parseEOF` in interface `JPRAParserType`
      Parameters:
        `lex` - Lexical information, if any
      Throws:
        `JPRACompilerParseException` - On parse errors

Copyright © 2016 <code@io7m.com> http://io7m.com