diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:41 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:41 -0800 |
commit | 648161bb0edfc3d43db63caed5cc5213bc6cb78f (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /WebKitTools/android/flex-2.5.4a/MISC/testxxLexer.l | |
parent | a65af38181ac7d34544586bdb5cd004de93897ad (diff) | |
download | external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.zip external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.tar.gz external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'WebKitTools/android/flex-2.5.4a/MISC/testxxLexer.l')
-rw-r--r-- | WebKitTools/android/flex-2.5.4a/MISC/testxxLexer.l | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/WebKitTools/android/flex-2.5.4a/MISC/testxxLexer.l b/WebKitTools/android/flex-2.5.4a/MISC/testxxLexer.l deleted file mode 100644 index 9421541..0000000 --- a/WebKitTools/android/flex-2.5.4a/MISC/testxxLexer.l +++ /dev/null @@ -1,58 +0,0 @@ - // An example of using the flex C++ scanner class. - -%option C++ noyywrap - -%{ -int mylineno = 0; -%} - -string \"[^\n"]+\" - -ws [ \t]+ - -alpha [A-Za-z] -dig [0-9] -name ({alpha}|{dig}|\$)({alpha}|{dig}|\_|\.|\-|\/|\$)* -num1 [-+]?{dig}+\.?([eE][-+]?{dig}+)? -num2 [-+]?{dig}*\.{dig}+([eE][-+]?{dig}+)? -number {num1}|{num2} - -%% - -{ws} /* skip blanks and tabs */ - -"/*" { - int c; - - while((c = yyinput()) != 0) - { - if(c == '\n') - ++mylineno; - - else if(c == '*') - { - if((c = yyinput()) == '/') - break; - else - unput(c); - } - } - } - -{number} cout << "number " << YYText() << '\n'; - -\n mylineno++; - -{name} cout << "name " << YYText() << '\n'; - -{string} cout << "string " << YYText() << '\n'; - -%% - -int main( int /* argc */, char** /* argv */ ) - { - FlexLexer* lexer = new yyFlexLexer; - while(lexer->yylex() != 0) - ; - return 0; - } |