📄 lex.cc_command.cpp
字号:
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
123, 123, 123
} ;
static ace_cc_yy_state_type ace_cc_yy_last_accepting_state;
static char *ace_cc_yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define ace_cc_yymore() ace_cc_yymore_used_but_not_detected
#define ACE_CC_YY_MORE_ADJ 0
#define ACE_CC_YY_RESTORE_ACE_CC_YY_MORE_OFFSET
char *ace_cc_yytext;
#define INITIAL 0
/* lex.CC_command.cpp,v 1.14 2003/11/05 03:59:58 dhinton Exp
* ============================================================================
*
* = LIBRARY
* TAO/orbsvcs/tests
*
* = FILENAME
* CC_command.l
*
* = DESCRIPTION
* This is the lex file for the concurrency service script language.
*
* = AUTHORS
* Torben Worm <tworm@cs.wustl.edu>
*
* ============================================================================
*/
#define ACE_CC_YY_NO_UNPUT 1
#define ACE_CC_YY_NO_INPUT 1
#define ACE_CC_YY_ALWAYS_INTERACTIVE 1
#include "CC_command.h"
#include "CC_command.tab.h"
#include "ace/ACE.h"
extern int line_no;
extern char line_buf[500];
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef ACE_CC_YY_SKIP_ACE_CC_YYWRAP
#ifdef __cplusplus
extern "C" int ace_cc_yywrap ACE_CC_YY_PROTO(( void ));
#else
extern int ace_cc_yywrap ACE_CC_YY_PROTO(( void ));
#endif
#endif
#ifndef ACE_CC_YY_NO_UNPUT
static void ace_cc_yyunput ACE_CC_YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef ace_cc_yytext_ptr
static void ace_cc_yy_flex_strncpy ACE_CC_YY_PROTO(( char *, ace_cc_yyconst char *, int ));
#endif
#ifdef ACE_CC_YY_NEED_STRLEN
static int ace_cc_yy_flex_strlen ACE_CC_YY_PROTO(( ace_cc_yyconst char * ));
#endif
#ifndef ACE_CC_YY_NO_INPUT
#ifdef __cplusplus
static int ace_cc_yyinput ACE_CC_YY_PROTO(( void ));
#else
static int input ACE_CC_YY_PROTO(( void ));
#endif
#endif
#if ACE_CC_YY_STACK_USED
static int ace_cc_yy_start_stack_ptr = 0;
static int ace_cc_yy_start_stack_depth = 0;
static int *ace_cc_yy_start_stack = 0;
#ifndef ACE_CC_YY_NO_PUSH_STATE
static void ace_cc_yy_push_state ACE_CC_YY_PROTO(( int new_state ));
#endif
#ifndef ACE_CC_YY_NO_POP_STATE
static void ace_cc_yy_pop_state ACE_CC_YY_PROTO(( void ));
#endif
#ifndef ACE_CC_YY_NO_TOP_STATE
static int ace_cc_yy_top_state ACE_CC_YY_PROTO(( void ));
#endif
#else
#define ACE_CC_YY_NO_PUSH_STATE 1
#define ACE_CC_YY_NO_POP_STATE 1
#define ACE_CC_YY_NO_TOP_STATE 1
#endif
#ifdef ACE_CC_YY_MALLOC_DECL
ACE_CC_YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include /**/ <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef ACE_CC_YY_READ_BUF_SIZE
#define ACE_CC_YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ACE_CC_ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ACE_CC_ECHO (void) fwrite( ace_cc_yytext, ace_cc_yyleng, 1, ace_cc_yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or ACE_CC_YY_NULL,
* is returned in "result".
*/
#ifndef ACE_CC_YY_INPUT
#define ACE_CC_YY_INPUT(buf,result,max_size) \
if ( ace_cc_yy_current_buffer->ace_cc_yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( ace_cc_yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( ace_cc_yyin ) ) \
ACE_CC_YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, ace_cc_yyin )) == 0) \
&& ferror( ace_cc_yyin ) ) \
ACE_CC_YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "ace_cc_yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef ace_cc_yyterminate
#define ace_cc_yyterminate() return ACE_CC_YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef ACE_CC_YY_START_STACK_INCR
#define ACE_CC_YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef ACE_CC_YY_FATAL_ERROR
#define ACE_CC_YY_FATAL_ERROR(msg) ace_cc_yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef ACE_CC_YY_DECL
#define ACE_CC_YY_DECL int ace_cc_yylex ACE_CC_YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after ace_cc_yytext and ace_cc_yyleng
* have been set up.
*/
#ifndef ACE_CC_YY_USER_ACTION
#define ACE_CC_YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef ACE_CC_YY_BREAK
#define ACE_CC_YY_BREAK break;
#endif
#define ACE_CC_YY_RULE_SETUP \
if ( ace_cc_yyleng > 0 ) \
ace_cc_yy_current_buffer->ace_cc_yy_at_bol = \
(ace_cc_yytext[ace_cc_yyleng - 1] == '\n'); \
ACE_CC_YY_USER_ACTION
ACE_CC_YY_DECL
{
register ace_cc_yy_state_type ace_cc_yy_current_state;
register char *ace_cc_yy_cp = NULL, *ace_cc_yy_bp = NULL;
register int ace_cc_yy_act;
if ( ace_cc_yy_init )
{
ace_cc_yy_init = 0;
#ifdef ACE_CC_YY_USER_INIT
ACE_CC_YY_USER_INIT;
#endif
if ( ! ace_cc_yy_start )
ace_cc_yy_start = 1; /* first start state */
if ( ! ace_cc_yyin )
ace_cc_yyin = stdin;
if ( ! ace_cc_yyout )
ace_cc_yyout = stdout;
if ( ! ace_cc_yy_current_buffer )
ace_cc_yy_current_buffer =
ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE );
ace_cc_yy_load_buffer_state();
}
ace_cc_yy_cp = ace_cc_yy_bp = 0; /* To avoid g++ warning about
possible uninitialized use. */
while ( 1 ) /* loops until end-of-file is reached */
{
ace_cc_yy_cp = ace_cc_yy_c_buf_p;
/* Support of ace_cc_yytext. */
*ace_cc_yy_cp = ace_cc_yy_hold_char;
/* ace_cc_yy_bp points to the position in ace_cc_yy_ch_buf of the start of
* the current run.
*/
ace_cc_yy_bp = ace_cc_yy_cp;
ace_cc_yy_current_state = ace_cc_yy_start;
ace_cc_yy_current_state += ACE_CC_YY_AT_BOL();
ace_cc_yy_match:
do
{
register ACE_CC_YY_CHAR ace_cc_yy_c = ace_cc_yy_ec[ACE_CC_YY_SC_TO_UI(*ace_cc_yy_cp)];
if ( ace_cc_yy_accept[ace_cc_yy_current_state] )
{
ace_cc_yy_last_accepting_state = ace_cc_yy_current_state;
ace_cc_yy_last_accepting_cpos = ace_cc_yy_cp;
}
while ( ace_cc_yy_chk[ace_cc_yy_base[ace_cc_yy_current_state] + ace_cc_yy_c] != ace_cc_yy_current_state )
{
ace_cc_yy_current_state = (int) ace_cc_yy_def[ace_cc_yy_current_state];
if ( ace_cc_yy_current_state >= 124 )
ace_cc_yy_c = ace_cc_yy_meta[(unsigned int) ace_cc_yy_c];
}
ace_cc_yy_current_state = ace_cc_yy_nxt[ace_cc_yy_base[ace_cc_yy_current_state] + (unsigned int) ace_cc_yy_c];
++ace_cc_yy_cp;
}
while ( ace_cc_yy_base[ace_cc_yy_current_state] != 143 );
ace_cc_yy_find_action:
ace_cc_yy_act = ace_cc_yy_accept[ace_cc_yy_current_state];
if ( ace_cc_yy_act == 0 )
{ /* have to back up */
ace_cc_yy_cp = ace_cc_yy_last_accepting_cpos;
ace_cc_yy_current_state = ace_cc_yy_last_accepting_state;
ace_cc_yy_act = ace_cc_yy_accept[ace_cc_yy_current_state];
}
ACE_CC_YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( ace_cc_yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of ACE_CC_YY_DO_BEFORE_ACTION */
*ace_cc_yy_cp = ace_cc_yy_hold_char;
ace_cc_yy_cp = ace_cc_yy_last_accepting_cpos;
ace_cc_yy_current_state = ace_cc_yy_last_accepting_state;
goto ace_cc_yy_find_action;
case 1:
ACE_CC_YY_RULE_SETUP
return T_TERM;
/* ACE_CC_YY_BREAK */
case 2:
ACE_CC_YY_RULE_SETUP
return T_START_CMD;
/* ACE_CC_YY_BREAK */
case 3:
ACE_CC_YY_RULE_SETUP
return T_CREATE_CMD;
/* ACE_CC_YY_BREAK */
case 4:
ACE_CC_YY_RULE_SETUP
return T_LOCK_CMD;
/* ACE_CC_YY_BREAK */
case 5:
ACE_CC_YY_RULE_SETUP
return T_UNLOCK_CMD;
/* ACE_CC_YY_BREAK */
case 6:
ACE_CC_YY_RULE_SETUP
return T_TRYLOCK_CMD;
/* ACE_CC_YY_BREAK */
case 7:
ACE_CC_YY_RULE_SETUP
return T_CHANGEMODE_CMD;
/* ACE_CC_YY_BREAK */
case 8:
ACE_CC_YY_RULE_SETUP
return T_SLEEP_CMD;
/* ACE_CC_YY_BREAK */
case 9:
ACE_CC_YY_RULE_SETUP
return T_WAIT_CMD;
/* ACE_CC_YY_BREAK */
case 10:
ACE_CC_YY_RULE_SETUP
return T_PRINT_CMD;
/* ACE_CC_YY_BREAK */
case 11:
ACE_CC_YY_RULE_SETUP
return T_REPEAT_CMD;
/* ACE_CC_YY_BREAK */
case 12:
ACE_CC_YY_RULE_SETUP
return T_EXCEP_CMD;
/* ACE_CC_YY_BREAK */
case 13:
ACE_CC_YY_RULE_SETUP
return T_LOOKUP_CMD;
/* ACE_CC_YY_BREAK */
case 14:
ACE_CC_YY_RULE_SETUP
return T_READ;
/* ACE_CC_YY_BREAK */
case 15:
ACE_CC_YY_RULE_SETUP
return T_IREAD;
/* ACE_CC_YY_BREAK */
case 16:
ACE_CC_YY_RULE_SETUP
return T_UPGRADE;
/* ACE_CC_YY_BREAK */
case 17:
ACE_CC_YY_RULE_SETUP
return T_WRITE;
/* ACE_CC_YY_BREAK */
case 18:
ACE_CC_YY_RULE_SETUP
return T_IWRITE;
/* ACE_CC_YY_BREAK */
case 19:
ACE_CC_YY_RULE_SETUP
{ ace_cc_yylval.id = ACE_OS::strdup(&ace_cc_yytext[1]);
ace_cc_yylval.id[ace_cc_yyleng-2]='\0';
return Q_STRING; }
/* ACE_CC_YY_BREAK */
case 20:
ACE_CC_YY_RULE_SETUP
{ ace_cc_yylval.num = atoi(ace_cc_yytext); return T_NUM; }
/* ACE_CC_YY_BREAK */
case 21:
ACE_CC_YY_RULE_SETUP
{ ace_cc_yylval.id = ACE_OS::strdup(ace_cc_yytext);
return T_IDENT; }
/* ACE_CC_YY_BREAK */
case 22:
ACE_CC_YY_RULE_SETUP
{ }
ACE_CC_YY_BREAK
case 23:
ACE_CC_YY_RULE_SETUP
{ }
ACE_CC_YY_BREAK
case 24:
ACE_CC_YY_RULE_SETUP
{ line_no ++;
ACE_OS::strcpy(line_buf, ace_cc_yytext+1);
ace_cc_yyless(1); }
ACE_CC_YY_BREAK
case 25:
ACE_CC_YY_RULE_SETUP
ACE_CC_ECHO;
ACE_CC_YY_BREAK
case ACE_CC_YY_STATE_EOF(INITIAL):
ace_cc_yyterminate();
case ACE_CC_YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int ace_cc_yy_amount_of_matched_text = (int) (ace_cc_yy_cp - ace_cc_yytext_ptr) - 1;
/* Undo the effects of ACE_CC_YY_DO_BEFORE_ACTION. */
*ace_cc_yy_cp = ace_cc_yy_hold_char;
ACE_CC_YY_RESTORE_ACE_CC_YY_MORE_OFFSET
if ( ace_cc_yy_current_buffer->ace_cc_yy_buffer_status == ACE_CC_YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed ace_cc_yyin at a new source and called
* ace_cc_yylex(). If so, then we have to assure
* consistency between ace_cc_yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
ace_cc_yy_n_chars = ace_cc_yy_current_buffer->ace_cc_yy_n_chars;
ace_cc_yy_current_buffer->ace_cc_yy_input_file = ace_cc_yyin;
ace_cc_yy_current_buffer->ace_cc_yy_buffer_status = ACE_CC_YY_BUFFER_NORMAL;
}
/* Note that here we test for ace_cc_yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since ace_cc_yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( ace_cc_yy_c_buf_p <= &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars] )
{ /* This was really a NUL. */
ace_cc_yy_state_type ace_cc_yy_next_state;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -