Top 10k strings from commandy.y
in <root> / bin / pc / Emulators / fuse-hc2000-hacks.7z / src / fuse / debugger /
Back to the directory listing
12 if( !$$ ) YYABORT; 3 $$ = debugger_expression_new_binaryop( $2, $1, $3, debugger_memory_pool ); 2 %token <token> 2 %token <string> 2 if( !$$ ) YYABORT; 2 $$ = debugger_expression_new_binaryop( 2 } 1 | number ':' number { $$.mask = $1; $$.value = $3; } 1 | TBREAK { $$ = DEBUGGER_BREAKPOINT_LIFE_ONESHOT; } 1 portbreakpointtype: READ { $$ = DEBUGGER_BREAKPOINT_TYPE_PORT_READ; } 1 optionalcondition: /* empty */ { $$ = NULL; } 1 numberorpc: /* empty */ { $$ = PC; } 1 number: expression { $$ = debugger_expression_evaluate( $1 ); } 1 expressionornull: /* empty */ { $$ = NULL; } 1 expression: NUMBER { $$ = debugger_expression_new_number( $1, debugger_memory_pool ); 1 debuggercommands: debuggercommand { $$ = $1; } 1 debuggercommand: STRING '\n' 1 command: BASE number { debugger_output_base = $2; } 1 breakpointtype: /* empty */ { $$ = DEBUGGER_BREAKPOINT_TYPE_EXECUTE; } 1 breakpointport: number { $$.mask = 0; $$.value = $1; } 1 breakpointlocation: numberorpc { $$.source = memory_source_any; $$.offset = $1; } 1 breakpointlife: BREAK { $$ = DEBUGGER_BREAKPOINT_LIFE_PERMANENT; } 1 /* commandy.y: Parse a debugger command 1 /* Unary minus, unary plus, !, ~ */ 1 /* Tokens as returned from the Flex scanner (commandl.l) */ 1 /* Some tokens are named DEBUGGER_* to avoid clashes with <windows.h> */ 1 /* Operator precedences */ 1 /* Needed by NetBSD yacc */ 1 /* Low precedence */ 1 /* High precedence */ 1 /* Derived types */ 1 /* == != */ 1 /* < > <= >= */ 1 %type <string> debuggercommands 1 %type <string> debuggercommand 1 %type <port> breakpointport 1 %type <location> breakpointlocation 1 %type <integer> numberorpc 1 %type <integer> number 1 %type <exp> optionalcondition 1 %type <exp> expressionornull 1 %type <exp> expression; 1 %type <bptype> portbreakpointtype 1 %type <bptype> breakpointtype 1 %type <bplife> breakpointlife 1 %token <token> NEGATE 1 %token <token> EQUALITY 1 %token <reg> 1 %token <integer> NUMBER 1 %token DEBUGGER_END 1 %token COMMANDS 1 %right NEGATE 1 %left TIMES_DIVIDE 1 %left LOGICAL_OR 1 %left LOGICAL_AND 1 %left EQUALITY 1 %left COMPARISON 1 %left '+' '-' 1 #include <string.h> 1 #include <stdlib.h> 1 #include <stdio.h> 1 #include <config.h> 1 #include "z80/z80_macros.h" 1 #include "z80/z80.h" 1 #include "ui/ui.h" 1 #include "mempool.h" 1 #include "debugger_internals.h" 1 #include "debugger.h" 1 #define YYERROR_VERBOSE 1 #define YYDEBUG 1 1 | breakpointlife breakpointtype breakpointlocation optionalcondition { 1 | breakpointlife TIME number optionalcondition { 1 | breakpointlife PORT portbreakpointtype breakpointport optionalcondition { 1 | breakpointlife EVENT STRING ':' STRING optionalcondition { 1 | SET VARIABLE number { debugger_variable_set( $2, $3 ); } 1 | SET NUMBER number { debugger_poke( $2, $3 ); } 1 | SET DEBUGGER_REGISTER number { debugger_register_set( $2, $3 ); } 1 | FINISH { debugger_breakpoint_exit(); } 1 | EXIT { debugger_exit_emulator(); } 1 | DISASSEMBLE number { ui_debugger_disassemble( $2 ); } 1 | DEBUGGER_PRINT number { printf( "0x%x\n", $2 ); } 1 | DEBUGGER_OUT number NUMBER { debugger_port_write( $2, $3 ); } 1 | DEBUGGER_IGNORE NUMBER number { 1 | DEBUGGER_DELETE { debugger_breakpoint_remove_all(); } 1 | DEBUGGER_DELETE number { debugger_breakpoint_remove( $2 ); } 1 | CONTINUE { debugger_run(); } 1 | CONDITION NUMBER expressionornull { 1 | COMMANDS number '\n' debuggercommands DEBUGGER_END { debugger_breakpoint_set_commands( $2, $4 ); } 1 | CLEAR numberorpc { debugger_breakpoint_clear( $2 ); } 1 TIMES_DIVIDE 1 LOGICAL_OR 1 LOGICAL_AND 1 DISASSEMBLE 1 DEBUGGER_REGISTER 1 DEBUGGER_PRINT 1 DEBUGGER_OUT 1 DEBUGGER_IGNORE 1 DEBUGGER_ERROR 1 DEBUGGER_DELETE 1 CONDITION 1 COMPARISON 1 /* empty */ 1 struct { libspectrum_word mask, value; } port; 1 struct { int source; int page; int offset; } location; 1 libspectrum_dword integer; 1 int token; 1 int reg; 1 debugger_expression* exp; 1 debugger_breakpoint_type bptype; 1 debugger_breakpoint_life bplife; 1 char *string; 1 DEBUGGER_TOKEN_LOGICAL_OR, $1, $3, debugger_memory_pool 1 DEBUGGER_TOKEN_LOGICAL_AND, $1, $3, debugger_memory_pool 1 | IF expression { $$ = $2; } 1 with this program; if not, write to the Free Software Foundation, Inc., 1 the Free Software Foundation; either version 2 of the License, or 1 it under the terms of the GNU General Public License as published by 1 but WITHOUT ANY WARRANTY; without even the implied warranty of 1 You should have received a copy of the GNU General Public License along 1 This program is free software; you can redistribute it and/or modify 1 This program is distributed in the hope that it will be useful, 1 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 1 GNU General Public License for more details. 1 E-mail: [email protected] 1 Copyright (c) 2002-2011 Philip Kendall 1 Author contact information: 1 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 1 (at your option) any later version. 1 $3, 0, $1, $4 ); 1 | number { $$ = $1; } 1 | expression TIMES_DIVIDE expression { 1 | expression LOGICAL_OR expression { 1 | expression LOGICAL_AND expression { 1 | expression EQUALITY expression { 1 | expression COMPARISON expression { 1 | expression '|' expression { 1 | expression '^' expression { 1 | expression '-' expression { 1 | expression '+' expression { 1 | expression '&' expression { 1 | WRITE { $$ = DEBUGGER_BREAKPOINT_TYPE_PORT_WRITE; } 1 | VARIABLE { $$ = debugger_expression_new_variable( $1, debugger_memory_pool ); 1 | NEGATE expression { 1 | DEBUGGER_REGISTER { $$ = debugger_expression_new_register( $1, debugger_memory_pool ); 1 | '-' expression %prec NEGATE { 1 | '+' expression %prec NEGATE { $$ = $2; } 1 | '(' expression ')' { $$ = $2; } 1 { debugger_step(); } 1 { debugger_next(); } 1 $3, $5, 0, $1, $6 ); 1 int mask = $4.mask; 1 if( mask == 0 ) mask = ( $4.value < 0x100 ? 0x00ff : 0xffff ); 1 debugger_breakpoint_set_condition( $2, $3 ); 1 debugger_breakpoint_ignore( $2, $3 ); 1 debugger_breakpoint_add_time( DEBUGGER_BREAKPOINT_TYPE_TIME, 1 debugger_breakpoint_add_port( $3, $4.value, mask, 0, $1, $5 ); 1 debugger_breakpoint_add_event( DEBUGGER_BREAKPOINT_TYPE_EVENT, 1 | input '\n' command 1 | error 1 | command 1 if( !$$ ) YYABORT; 1 | READ { $$ = DEBUGGER_BREAKPOINT_TYPE_READ; } 1 $$ = debugger_expression_new_unaryop( '-', $2, debugger_memory_pool ); 1 $$ = debugger_expression_new_unaryop( $1, $2, debugger_memory_pool ); 1 $$ = debugger_expression_new_binaryop( '|', $1, $3, debugger_memory_pool ); 1 $$ = debugger_expression_new_binaryop( '^', $1, $3, debugger_memory_pool ); 1 $$ = debugger_expression_new_binaryop( '-', $1, $3, debugger_memory_pool ); 1 $$ = debugger_expression_new_binaryop( '+', $1, $3, debugger_memory_pool ); 1 $$ = debugger_expression_new_binaryop( '&', $1, $3, debugger_memory_pool ); 1 | expression { $$ = $1; } 1 debugger_breakpoint_add_address( $2, $3.source, $3.page, $3.offset, 1 | WRITE { $$ = DEBUGGER_BREAKPOINT_TYPE_WRITE; } 1 ); 1 | debuggercommands debuggercommand { 1 } 1 | STRING ':' number ':' number { 1 } 1 sprintf( $$, "%s\n%s", $1, $2 ); 1 $$ = mempool_alloc( debugger_memory_pool, strlen( $1 ) + strlen( $2 ) + 2 ); 1 } 1 if( $$.source == -1 ) { 1 $$.source = memory_source_find( $1 ); 1 $$.page = $3; 1 $$.offset = $5; 1 yyerror( buffer ); 1 snprintf( buffer, 80, "unknown memory source \"%s\"", $1 ); 1 char buffer[80]; 1 YYERROR; 1 0, $1, $4 );