Merge pull request #2318 from jwillemsen/jwi-add_forward_profiles
[ACE_TAO.git] / TAO / orbsvcs / tests / Concurrency / CC_command.l
blob97a4e9bf70907b275b0046339e15def44e731426
1 /*
2  * ============================================================================
3  *
4  * = LIBRARY
5  *    TAO/orbsvcs/tests
6  *
7  * = FILENAME
8  *    CC_command.l
9  *
10  * = DESCRIPTION
11  *   This is the lex file for the concurrency service script language.
12  *
13  * = AUTHORS
14  *      Torben Worm <tworm@cs.wustl.edu>
15  *
16  * ============================================================================
17  */
18 %option noyywrap nounput noinput always-interactive
20 #include "CC_command.h"
21 #include "CC_command.tab.h"
22 #include "ace/ACE.h"
24 extern int line_no;
25 extern char line_buf[500];
30 ;                      return T_TERM;
31 start                  return T_START_CMD;
32 create                 return T_CREATE_CMD;
33 lock                   return T_LOCK_CMD;
34 unlock                 return T_UNLOCK_CMD;
35 try_lock               return T_TRYLOCK_CMD;
36 change_mode            return T_CHANGEMODE_CMD;
37 sleep                  return T_SLEEP_CMD;
38 wait                   return T_WAIT_CMD;
39 print                  return T_PRINT_CMD;
40 repeat                 return T_REPEAT_CMD;
41 exception              return T_EXCEP_CMD;
42 lookup                 return T_LOOKUP_CMD;
43 read                   return T_READ;
44 intention_read         return T_IREAD;
45 upgrade                return T_UPGRADE;
46 write                  return T_WRITE;
47 intention_write        return T_IWRITE;
48 \".*\"                 { yylval.id = ACE_OS::strdup(&yytext[1]);
49                          yylval.id[yyleng-2]='\0';
50                          return Q_STRING; }
51 [0-9]+                 { yylval.num = atoi(yytext); return T_NUM; }
52 [A-Za-z][A-Za-z_0-9\.:/]*  { yylval.id = ACE_OS::strdup(yytext);
53                            return T_IDENT; }
54 ^\/\/.*\n                       { }
55 [ ]+                    { }
56 \n.*                     { line_no ++;
57                            ACE_OS::strcpy(line_buf, yytext+1);
58                            yyless(1); }