Archive

Posts Tagged ‘regular expression’

Regular expressions for matching data values in compiler lexers.

May 10, 2014 Leave a comment

Below, there are some useful regular expressions for matching C-like primitive data values.

Read more…

Ignoring multiline comments with start states in compilers with Flex.

May 10, 2014 Leave a comment

In a previous article I have presented a way for ignoring multiline comments with an old fashion way.

In this article I’ll demonstrate a more elegant Flex-like way for ignoring multiline comments.

Read more…

A simple Flex lexer example for counting words, lines, characters.

May 10, 2014 Leave a comment

Below, is a simple example for counting words, lines and characters by using a Flex lexer.

Read more…

A simple PHP function that implements email validation.

May 23, 2013 1 comment

In this article I’ll show you a simple PHP function that implements email validation.

The function performs two checks :

It checks both if the email has correct syntax and if the domain of the email exists.

Read more…

Ignoring multiline comments in compilers with Flex.

May 5, 2013 1 comment

In your lexer when lexical analysis is performed you may want to ignore any multiline C-like comments.

Read more…