Class EoSyntax


  • public final class EoSyntax
    extends Object
    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
      • EoSyntax

        public EoSyntax​(String ipt)
        Ctor.
        Parameters:
        ipt - The EO program to parse
      • EoSyntax

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

        public EoSyntax​(String nme,
                        String ipt,
                        com.yegor256.xsline.Train<com.yegor256.xsline.Shift> transform)
        Ctor.
        Parameters:
        nme - The name of the EO program being parsed
        ipt - The EO program to parse
        transform - Transform XMIR after parsing
      • 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.

        Returns:
        Parsed XML
        Throws:
        IOException - If fails