From 6c20df45bd23cc68e001dc660a0194d9ded738e6 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 1 Jul 2007 16:34:15 +0000 Subject: Now it's in the right place. It'd build if svn mv would delete the dir... --- c++filt/c++filt.l | 62 --------------------------------------------------- src/c++filt/c++filt.l | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 62 deletions(-) delete mode 100644 c++filt/c++filt.l create mode 100644 src/c++filt/c++filt.l diff --git a/c++filt/c++filt.l b/c++filt/c++filt.l deleted file mode 100644 index af12cac..0000000 --- a/c++filt/c++filt.l +++ /dev/null @@ -1,62 +0,0 @@ -%{ -# include - -int nBC = 0; -%} - -%s hasT -%x inWith -%x inT -%option noyywrap nounput batch - -%% - -"operator<<" { ECHO; } -"operator>>" { ECHO; } -"operator". { ECHO; } - -"<<" { ECHO; } -">>" { ECHO; } -" <<" { ECHO; } -" >>" { ECHO; } - -"" { ECHO; } - -\n+ { - BEGIN( INITIAL ); - nBC = false; - ECHO; -} - -" <" { ECHO; } - -"<" { - BEGIN( inT ); - printf("<...>"); - nBC++; -} - -"<" { - nBC++; - -} -[^<>]* { } -">" { - nBC--; - if( nBC == 0 ) - BEGIN( hasT ); -} - -" [with"[^\]]*"]" { } - -%% - -int main() -{ - yyin = stdin; - - yylex(); - - return 0; -} - diff --git a/src/c++filt/c++filt.l b/src/c++filt/c++filt.l new file mode 100644 index 0000000..af12cac --- /dev/null +++ b/src/c++filt/c++filt.l @@ -0,0 +1,62 @@ +%{ +# include + +int nBC = 0; +%} + +%s hasT +%x inWith +%x inT +%option noyywrap nounput batch + +%% + +"operator<<" { ECHO; } +"operator>>" { ECHO; } +"operator". { ECHO; } + +"<<" { ECHO; } +">>" { ECHO; } +" <<" { ECHO; } +" >>" { ECHO; } + +"" { ECHO; } + +\n+ { + BEGIN( INITIAL ); + nBC = false; + ECHO; +} + +" <" { ECHO; } + +"<" { + BEGIN( inT ); + printf("<...>"); + nBC++; +} + +"<" { + nBC++; + +} +[^<>]* { } +">" { + nBC--; + if( nBC == 0 ) + BEGIN( hasT ); +} + +" [with"[^\]]*"]" { } + +%% + +int main() +{ + yyin = stdin; + + yylex(); + + return 0; +} + -- cgit v1.2.3