Category Archives: flex

An example with flex++ (using flex C++ scanner class)

Here is an example of a simple C++ scanner: // An example of using the flex C++ scanner class. %{      int mylineno = 0; %} string  \”[^\n”]+\” ws      [ \t]+ alpha   [A-Za-z] dig     [0-9] name    ({alpha}|{dig}|\$)({alpha}|{dig}|[_.\-/$])* num1    [-+]?{dig}+\.?([eE][-+]?{dig}+)? num2    … Continue reading

Posted in flex, lex | Comments Off on An example with flex++ (using flex C++ scanner class)