An interpreter is a computer program that directly executes source code or translates source code into an intermediate representation to immediately execute. A parser is a program that breaks input like source code instructions or markup tags into parts like nouns, verbs, and attributes, and checks that all necessary input is provided. Parsers are often part of interpreters or compilers and check syntax to build a parse tree from tokens created by a lexical analyzer.