Class Parser


  • public class Parser
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Parser()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ASTNode parse​(java.util.Deque<Token> tokens)
      Given a stack of tokens produced by the Lexer, compiles an AST.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Parser

        public Parser()
    • Method Detail

      • parse

        public static ASTNode parse​(java.util.Deque<Token> tokens)
                             throws CompilationException
        Given a stack of tokens produced by the Lexer, compiles an AST.
        Parameters:
        tokens - The tokens to be processed
        Returns:
        The final AST
        Throws:
        CompilationException - In case of oopsies