A regular expression is an expression that explains a pattern for a string. A string matches a regular expression if that string follows the pattern of that regular expression. In computing, a regular expression provides a concise and flexible means for "matching" (specifying and recognizing) strings of text, such as particular characters, words, or patterns of characters.
Compiler constructor is a process of creating a compiler. Compiler is a computer program that translates the high level language source code into low level language. Compiler construction is a complex process that is divided into different phases like front end, middle end and back end.
Regular expressions are used in front end phase in the lexical analysis. In this phase the source code is break down into small pieces called tokens. Finite state automation is used to recognized tokens and it is constructed from regular expressions.
Regular expressions are used by many text editors, utilities, and programming languages to search and manipulate text based on patterns. Some of these languages, including Perl, Ruby, AWK, and Tcl, integrate regular expressions into the syntax of the core language itself. Other programming languages like .NET languages, Java, and Python instead provide regular expressions through standard libraries.
No comments:
Post a Comment