Class EoSyntax

  • All Implemented Interfaces:
    Syntax

    public final class EoSyntax
    extends Object
    implements Syntax
    Syntax parser, from EO to XMIR, using ANTLR4.
    Since:
    0.1
    • Constructor Detail

      • EoSyntax

        public EoSyntax​(org.cactoos.Input ipt)
        Ctor.
        Parameters:
        ipt - The EO program to parse
        Since:
        0.40.0
      • EoSyntax

        public EoSyntax​(String nme,
                        org.cactoos.Input ipt)
        Ctor.
        Parameters:
        nme - The name of the EO program being parsed
        ipt - The EO program to parse
    • Method Detail

      • parsed

        public com.jcabi.xml.XML parsed()
                                 throws IOException
        Compile it to XML and save.

        No exception will be thrown if the syntax is invalid. In any case, XMIR will be generated and saved. Read it in order to find the errors, at /program/errors XPath.

        Specified by:
        parsed in interface Syntax
        Returns:
        Parsed XML
        Throws:
        IOException - If fails