Develop a parser that checks whether the sequence of tokens from the lexer conforms to the syntax rules defined in the language grammar. The parser should also construct an Abstract Syntax Tree (AST) from the tokens. Key features to implement include: