SHARE
TWEET

Untitled

a guest Feb 24th, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %X  DOCUMENT    TITLE   CHAPTER
  2. abc [a-zA-Z0-9 ]+
  3. %%
  4. "\\begin{".*    {BEGIN DOCUMENT;}
  5. <DOCUMENT>"\\title{"    {BEGIN TITLE;}
  6. <TITLE>{abc}    {
  7.         int i=0;
  8.         while(i<yytext[i])
  9.         {
  10.             if(yytext[i]>=97 && yytext[i]<=122){
  11.                 printf("%c",yytext[i]-32);
  12.             }else{
  13.                 printf("%c",yytext[i]);
  14.             }
  15.            
  16.             i++;
  17.         }
  18.  
  19. }
  20. <TITLE>"}"  {BEGIN 0;}
  21.  
  22. %%
  23. int main()
  24. {
  25. yylex();
  26. return 0;
  27. }
  28.  
  29. int yywrap()
  30. {
  31. return 1;
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top