When an input string (source code or a program in some language) is given to a compiler, the compiler processes it in several phases, starting from lexical analysis (scans the input and divides it into tokens) to target code generation.
Syntax analysis is the second phase of a compiler i.e. After lexical analysis. It checks the syntactical structure of the given input, i.e. Whether the given input is in the correct syntax (of the language in which the input has been written) or not.
If the given input string can be produced with the help of the syntax tree (in the derivation process), the input string is found to be in the correct syntax.
For detailed information get help at CodeAvail-
Online Computer Science Assignment help