What is "parser"

The *parser * refers to the software or algorithm that breaks an artifact into its constituent elements and captures the relationship between these elements.

When the artifact is an arbitrary text flow, Parsing or parsing is often used to break the flow into constituent pieces (words or lexemas).

When the artifact is a natural language text stream, the analysis is used to break the flow into natural language elements (words and punctuation) and discover the structure of the text as sentences or sentences.

When the artifact is a text string that corresponds to a language used in computer or other formal language, the analysis consists of applying any of a variety of parsing algorithms (ad-hoc, recursive Descent, LL, LR , Packrat , Earley or other) for the source text (usually broken in lexemas by another lower level parser called "léxer") to verify the validity of the source language, and often for the construction of an analysis tree representing the grammatical productions used for the text excerpt.

The term can be applied more generally, analyzing the whole complex structure, such as a binary data file or a graph.