The framework for considering a string of characters, throughout the basic language, database management system, or DS by formal grammatical codes or syntax, is considered as a Syntax analysis.
During a lexical analysis stage, everything just accepts or considers the tokens created as an input as well as creates a parse tree as an output or outcome.