HyperDbg Debugger
Loading...
Searching...
No Matches
hyperdbg/script-engine/python/Grammar.txt File Reference

Macros

#define function
 

Functions

VARIABLE_TYPE4 START_OF_USER_DEFINED_FUNCTION (VARIABLE_TYPE5)
 
L_VALUE2 CALL_USER_DEFINED_FUNCTION (CALL_USER_DEFINED_FUNCTION_PARAMETER) @END_OF_CALLING_USER_DEFINED_FUNCTION_WITHOUT_RETURNING_VALUE
 
CALL_USER_DEFINED_FUNCTION_PARAMETER eps CALL_USER_DEFINED_FUNCTION_PARAMETER EXPRESSION CALL_USER_DEFINED_FUNCTION_PARAMETER CALL_USER_DEFINED_FUNCTION_PARAMETER2 EXPRESSION CALL_USER_DEFINED_FUNCTION_PARAMETER CALL_USER_DEFINED_FUNCTION_PARAMETER2 CALL_USER_DEFINED_FUNCTION_PARAMETER2 eps ASSIGNMENT_STATEMENT INC ASSIGNMENT_STATEMENT DEC EXPRESSION VA VA eps IF_STATEMENT if START_OF_IF (BOOLEAN_EXPRESSION) @JZ
 
ELSIF_STATEMENT ELSE_STATEMENT END_OF_IF END_OF_IF ELSIF_STATEMENT elsif JMP_TO_END_AND_JZCOMPLETED (BOOLEAN_EXPRESSION) @JZ
 
FOR_STATEMENT for (SIMPLE_ASSIGNMENT ; @START_OF_FOR BOOLEAN_EXPRESSION ; @FOR_INC_DEC INC_DEC)
 

Variables

ThreeOpFunc1 interlocked_compare_exchange ThreeOpFunc2 event_inject_error_code memcpy TwoOpFunc1 ed eb eq interlocked_exchange interlocked_exchange_add TwoOpFunc2 spinlock_lock_custom_wait event_inject OneOpFunc1 poi db dd dw dq neg hi low not check_address disassemble_len disassemble_len32 disassemble_len64 interlocked_increment interlocked_decrement reference physical_to_virtual virtual_to_physical OneOpFunc2 print formats event_enable event_disable event_clear test_statement spinlock_lock spinlock_unlock event_sc OneOpFunc3 strlen TwoOpFunc3 strcmp ThreeOpFunc3 memcmp strncmp ThreeOpFunc4 wcsncmp OneOpFunc4 wcslen TwoOpFunc4 wcscmp ZeroOpFunc1 pause flush event_trace_step event_trace_step_in event_trace_step_out event_trace_instrumentation_step event_trace_instrumentation_step_in VarArgFunc1 printf OperatorsTwoOperand or xor and asr asl add sub mul div mod gt lt egt elt equal neq OperatorsOneOperand inc dec reference dereference SemantiRules start_of_if jmp jz jnz jmp_to_end_and_jzcompleted end_of_if start_of_while end_of_while vargstart mov start_of_do_while start_of_do_while_commands end_of_do_while start_of_for for_inc_dec start_of_for_ommands end_of_if ignore_lvalue push pop call ret Registers rax eax ax ah al rcx ecx cx ch cl rdx edx dx dh dl rbx ebx bx bh bl rsp esp sp spl rbp ebp bp bpl rsi esi si sil rdi edi di dil r8 r8d r8w r8h r8l r9 r9d r9w r9h r9l r10 r10d r10w r10h r10l r11 r11d r11w r11h r11l r12 r12d r12w r12h r12l r13 r13d r13w r13h r13l r14 r14d r14w r14h r14l r15 r15d r15w r15h r15l ds es fs gs cs ss rflags eflags flags cf pf af zf sf tf if df of iopl nt rf vm ac vif vip id rip eip ip idtr ldtr gdtr tr cr0 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr6 dr7 PseudoRegisters pid tid pname core proc thread peb teb ip buffer context event_tag event_id event_stage date time S STATEMENT S S
 
STATEMENT break BREAK
 
STATEMENT continue CONTINUE
 
STATEMENT VARIABLE_TYPE3 S2 STATEMENT2 S2 S2
 
STATEMENT2 VARIABLE_TYPE1 VARIABLE_TYPE2 L_VALUE = EXPRESSION @MOV
 
STATEMENT2 return RETURN
 
RETURN eps RETURN_OF_USER_DEFINED_FUNCTION_WITHOUT_VALUE RETURN EXPRESSION RETURN_OF_USER_DEFINED_FUNCTION_WITH_VALUE VARIABLETYPE void bool char short int long unsigned signed float double VARIABLE_TYPE1 PUSH VARIABLETYPE VARIABLE_TYPE2 VARIABLE_TYPE1 VARIABLE_TYPE2 eps VARIABLE_TYPE3 VARIABLE_TYPE1 VARIABLE_TYPE2 L_VALUE VARIABLE_TYPE4 VARIABLE_TYPE4 = EXPRESSION @MOV
 
VARIABLE_TYPE5 eps VARIABLE_TYPE5 VARIABLE_TYPE1 VARIABLE_TYPE2 L_VALUE FUNCTION_PARAMETER VARIABLE_TYPE6 VARIABLE_TYPE6
 
VARIABLE_TYPE5 eps VARIABLE_TYPE5 VARIABLE_TYPE1 VARIABLE_TYPE2 L_VALUE FUNCTION_PARAMETER VARIABLE_TYPE6 VARIABLE_TYPE1 VARIABLE_TYPE2 L_VALUE FUNCTION_PARAMETER VARIABLE_TYPE6 VARIABLE_TYPE6 eps L_VALUE2 ASSIGNMENT_STATEMENT
 
CALL_USER_DEFINED_FUNCTION_PARAMETER eps CALL_USER_DEFINED_FUNCTION_PARAMETER EXPRESSION CALL_USER_DEFINED_FUNCTION_PARAMETER CALL_USER_DEFINED_FUNCTION_PARAMETER2 CALL_USER_DEFINED_FUNCTION_PARAMETER2
 
ELSIF_STATEMENT ELSIF_STATEMENT JMP_TO_END_AND_JZCOMPLETED ELSIF_STATEMENT ELSIF_STATEMENT eps ELSE_STATEMENT else
 

Macro Definition Documentation

◆ function

#define function

Function Documentation

◆ CALL_USER_DEFINED_FUNCTION()

L_VALUE2 CALL_USER_DEFINED_FUNCTION ( CALL_USER_DEFINED_FUNCTION_PARAMETER )

◆ for()

FOR_STATEMENT for ( SIMPLE_ASSIGNMENT ; @START_OF_FOR BOOLEAN_EXPRESSION ; @FOR_INC_DEC INC_DEC)
141{ @START_OF_FOR_COMMANDS S2 @END_OF_FOR }
STATEMENT VARIABLE_TYPE3 S2 STATEMENT2 S2 S2
Definition Grammar.txt:65

◆ JMP_TO_END_AND_JZCOMPLETED()

ELSIF_STATEMENT ELSE_STATEMENT END_OF_IF END_OF_IF ELSIF_STATEMENT elsif JMP_TO_END_AND_JZCOMPLETED ( BOOLEAN_EXPRESSION )
ELSIF_STATEMENT()
Definition test-case-generator.py:83

◆ START_OF_IF()

CALL_USER_DEFINED_FUNCTION_PARAMETER eps CALL_USER_DEFINED_FUNCTION_PARAMETER EXPRESSION CALL_USER_DEFINED_FUNCTION_PARAMETER CALL_USER_DEFINED_FUNCTION_PARAMETER2 EXPRESSION CALL_USER_DEFINED_FUNCTION_PARAMETER CALL_USER_DEFINED_FUNCTION_PARAMETER2 CALL_USER_DEFINED_FUNCTION_PARAMETER2 eps ASSIGNMENT_STATEMENT INC ASSIGNMENT_STATEMENT DEC EXPRESSION VA VA eps IF_STATEMENT if START_OF_IF ( BOOLEAN_EXPRESSION )
END_OF_IF()
Definition test-case-generator.py:121
ELSE_STATEMENT()
Definition test-case-generator.py:104

◆ START_OF_USER_DEFINED_FUNCTION()

VARIABLE_TYPE4 START_OF_USER_DEFINED_FUNCTION ( VARIABLE_TYPE5 )
92{ S2 @END_OF_USER_DEFINED_FUNCTION }

Variable Documentation

◆ ASSIGNMENT_STATEMENT

CALL_USER_DEFINED_FUNCTION_PARAMETER eps CALL_USER_DEFINED_FUNCTION_PARAMETER EXPRESSION CALL_USER_DEFINED_FUNCTION_PARAMETER CALL_USER_DEFINED_FUNCTION_PARAMETER2 EXPRESSION CALL_USER_DEFINED_FUNCTION_PARAMETER CALL_USER_DEFINED_FUNCTION_PARAMETER2 CALL_USER_DEFINED_FUNCTION_PARAMETER2 eps ASSIGNMENT_STATEMENT INC ASSIGNMENT_STATEMENT DEC ASSIGNMENT_STATEMENT
Initial value:
= EXPRESSION @MOV
CALL_FUNC_STATEMENT->.OneOpFunc2 ( EXPRESSION @.OneOpFunc2 )
CALL_FUNC_STATEMENT->.VarArgFunc1 ( STRING @VARGSTART VA @.VarArgFunc1 )
CALL_FUNC_STATEMENT->.ZeroOpFunc1 ( @.ZeroOpFunc1 )
CALL_FUNC_STATEMENT->.TwoOpFunc2 ( EXPRESSION , EXPRESSION @.TwoOpFunc2 )
CALL_FUNC_STATEMENT->.OneOpFunc1 ( EXPRESSION @.OneOpFunc1 ) @IGNORE_LVALUE
CALL_FUNC_STATEMENT->.TwoOpFunc1 ( EXPRESSION , EXPRESSION @.TwoOpFunc1 ) @IGNORE_LVALUE
CALL_FUNC_STATEMENT->.ThreeOpFunc1 ( EXPRESSION , EXPRESSION , EXPRESSION @.ThreeOpFunc1 ) @IGNORE_LVALUE
CALL_FUNC_STATEMENT->.OneOpFunc3 ( StringNumber @.OneOpFunc3 ) @IGNORE_LVALUE
CALL_FUNC_STATEMENT->.TwoOpFunc3 ( StringNumber , StringNumber @.TwoOpFunc3 ) @IGNORE_LVALUE
CALL_FUNC_STATEMENT->.ThreeOpFunc3 ( StringNumber , StringNumber , EXPRESSION @.ThreeOpFunc3 ) @IGNORE_LVALUE
CALL_FUNC_STATEMENT->.OneOpFunc4 ( WstringNumber @.OneOpFunc4 ) @IGNORE_LVALUE
CALL_FUNC_STATEMENT->.TwoOpFunc4 ( WstringNumber , WstringNumber @.TwoOpFunc4 ) @IGNORE_LVALUE
CALL_FUNC_STATEMENT->.ThreeOpFunc2 ( EXPRESSION , EXPRESSION , EXPRESSION @.ThreeOpFunc2 )
CALL_FUNC_STATEMENT->.ThreeOpFunc4 ( WstringNumber , WstringNumber , EXPRESSION @.ThreeOpFunc4 ) @IGNORE_LVALUE
VA->
const char * ThreeOpFunc1[]
Definition parse-table.c:958
const char * OneOpFunc2[]
Definition parse-table.c:996
const char * TwoOpFunc2[]
Definition parse-table.c:972
const char * OneOpFunc3[]
Definition parse-table.c:1007
const char * TwoOpFunc4[]
Definition parse-table.c:1023
const char * VarArgFunc1[]
Definition parse-table.c:1035
const char * ZeroOpFunc1[]
Definition parse-table.c:1026
const char * TwoOpFunc1[]
Definition parse-table.c:965
const char * ThreeOpFunc2[]
Definition parse-table.c:961
const char * TwoOpFunc3[]
Definition parse-table.c:1010
const char * OneOpFunc4[]
Definition parse-table.c:1020
const char * ThreeOpFunc3[]
Definition parse-table.c:1013
const char * OneOpFunc1[]
Definition parse-table.c:976
const char * ThreeOpFunc4[]
Definition parse-table.c:1017
@ STRING
Definition common.h:58

◆ BREAK

STATEMENT2 break BREAK

◆ CALL_USER_DEFINED_FUNCTION_PARAMETER2

CALL_USER_DEFINED_FUNCTION_PARAMETER eps CALL_USER_DEFINED_FUNCTION_PARAMETER EXPRESSION CALL_USER_DEFINED_FUNCTION_PARAMETER CALL_USER_DEFINED_FUNCTION_PARAMETER2 CALL_USER_DEFINED_FUNCTION_PARAMETER2

◆ CONTINUE

STATEMENT2 continue CONTINUE

◆ else

ELSIF_STATEMENT ELSIF_STATEMENT JMP_TO_END_AND_JZCOMPLETED ELSIF_STATEMENT ELSIF_STATEMENT eps ELSE_STATEMENT else
Initial value:
{ S2 }
ELSE_STATEMENT->eps
END_OF_IF->eps
WHILE_STATEMENT->while @START_OF_WHILE ( BOOLEAN_EXPRESSION ) @START_OF_WHILE_COMMANDS { S2 @END_OF_WHILE }
DO_WHILE_STATEMENT->do @START_OF_DO_WHILE { S2 } while ( BOOLEAN_EXPRESSION ) @END_OF_DO_WHILE
DO_WHILE_STATEMENT()
Definition test-case-generator.py:132
132 { S2 }
134END_OF_IF->eps
135
136
137
138WHILE_STATEMENT->while @START_OF_WHILE ( BOOLEAN_EXPRESSION ) @START_OF_WHILE_COMMANDS { S2 @END_OF_WHILE }
139DO_WHILE_STATEMENT->do @START_OF_DO_WHILE { S2 } while ( BOOLEAN_EXPRESSION ) @END_OF_DO_WHILE ;
WHILE_STATEMENT()
Definition test-case-generator.py:125

◆ L_VALUE

STATEMENT2 VARIABLE_TYPE1 VARIABLE_TYPE2 L_VALUE = EXPRESSION @MOV

◆ RETURN

STATEMENT2 return RETURN

◆ S

ThreeOpFunc1 interlocked_compare_exchange ThreeOpFunc2 event_inject_error_code memcpy TwoOpFunc1 ed eb eq interlocked_exchange interlocked_exchange_add TwoOpFunc2 spinlock_lock_custom_wait event_inject OneOpFunc1 poi db dd dw dq neg hi low not check_address disassemble_len disassemble_len32 disassemble_len64 interlocked_increment interlocked_decrement reference physical_to_virtual virtual_to_physical OneOpFunc2 print formats event_enable event_disable event_clear test_statement spinlock_lock spinlock_unlock event_sc OneOpFunc3 strlen TwoOpFunc3 strcmp ThreeOpFunc3 memcmp strncmp ThreeOpFunc4 wcsncmp OneOpFunc4 wcslen TwoOpFunc4 wcscmp ZeroOpFunc1 pause flush event_trace_step event_trace_step_in event_trace_step_out event_trace_instrumentation_step event_trace_instrumentation_step_in VarArgFunc1 printf OperatorsTwoOperand or xor and asr asl add sub mul div mod gt lt egt elt equal neq OperatorsOneOperand inc dec reference dereference SemantiRules start_of_if jmp jz jnz jmp_to_end_and_jzcompleted end_of_if start_of_while end_of_while vargstart mov start_of_do_while start_of_do_while_commands end_of_do_while start_of_for for_inc_dec start_of_for_ommands end_of_if ignore_lvalue push pop call ret Registers rax eax ax ah al rcx ecx cx ch cl rdx edx dx dh dl rbx ebx bx bh bl rsp esp sp spl rbp ebp bp bpl rsi esi si sil rdi edi di dil r8 r8d r8w r8h r8l r9 r9d r9w r9h r9l r10 r10d r10w r10h r10l r11 r11d r11w r11h r11l r12 r12d r12w r12h r12l r13 r13d r13w r13h r13l r14 r14d r14w r14h r14l r15 r15d r15w r15h r15l ds es fs gs cs ss rflags eflags flags cf pf af zf sf tf if df of iopl nt rf vm ac vif vip id rip eip ip idtr ldtr gdtr tr cr0 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr6 dr7 PseudoRegisters pid tid pname core proc thread peb teb ip buffer context event_tag event_id event_stage date time S STATEMENT S S
Initial value:
{ STATEMENT S }
S->eps
STATEMENT->IF_STATEMENT
STATEMENT->WHILE_STATEMENT
STATEMENT->DO_WHILE_STATEMENT
STATEMENT->FOR_STATEMENT
STATEMENT->L_VALUE L_VALUE2
STATEMENT->CALL_FUNC_STATEMENT
ThreeOpFunc1 interlocked_compare_exchange ThreeOpFunc2 event_inject_error_code memcpy TwoOpFunc1 ed eb eq interlocked_exchange interlocked_exchange_add TwoOpFunc2 spinlock_lock_custom_wait event_inject OneOpFunc1 poi db dd dw dq neg hi low not check_address disassemble_len disassemble_len32 disassemble_len64 interlocked_increment interlocked_decrement reference physical_to_virtual virtual_to_physical OneOpFunc2 print formats event_enable event_disable event_clear test_statement spinlock_lock spinlock_unlock event_sc OneOpFunc3 strlen TwoOpFunc3 strcmp ThreeOpFunc3 memcmp strncmp ThreeOpFunc4 wcsncmp OneOpFunc4 wcslen TwoOpFunc4 wcscmp ZeroOpFunc1 pause flush event_trace_step event_trace_step_in event_trace_step_out event_trace_instrumentation_step event_trace_instrumentation_step_in VarArgFunc1 printf OperatorsTwoOperand or xor and asr asl add sub mul div mod gt lt egt elt equal neq OperatorsOneOperand inc dec reference dereference SemantiRules start_of_if jmp jz jnz jmp_to_end_and_jzcompleted end_of_if start_of_while end_of_while vargstart mov start_of_do_while start_of_do_while_commands end_of_do_while start_of_for for_inc_dec start_of_for_ommands end_of_if ignore_lvalue push pop call ret Registers rax eax ax ah al rcx ecx cx ch cl rdx edx dx dh dl rbx ebx bx bh bl rsp esp sp spl rbp ebp bp bpl rsi esi si sil rdi edi di dil r8 r8d r8w r8h r8l r9 r9d r9w r9h r9l r10 r10d r10w r10h r10l r11 r11d r11w r11h r11l r12 r12d r12w r12h r12l r13 r13d r13w r13h r13l r14 r14d r14w r14h r14l r15 r15d r15w r15h r15l ds es fs gs cs ss rflags eflags flags cf pf af zf sf tf if df of iopl nt rf vm ac vif vip id rip eip ip idtr ldtr gdtr tr cr0 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr6 dr7 PseudoRegisters pid tid pname core proc thread peb teb ip buffer context event_tag event_id event_stage date time S STATEMENT S S
Definition Grammar.txt:51
51{ STATEMENT S }
STATEMENT()
Definition test-case-generator.py:25

◆ S2

STATEMENT VARIABLE_TYPE3 S2 STATEMENT2 S2 S2
Initial value:
{ STATEMENT2 S2 }
S2->eps
STATEMENT2->IF_STATEMENT
STATEMENT2->WHILE_STATEMENT
STATEMENT2->DO_WHILE_STATEMENT
STATEMENT2->FOR_STATEMENT
STATEMENT2->L_VALUE L_VALUE2
STATEMENT2->CALL_FUNC_STATEMENT
65{ STATEMENT2 S2 }

◆ VARIABLE_TYPE4

RETURN eps RETURN_OF_USER_DEFINED_FUNCTION_WITHOUT_VALUE RETURN EXPRESSION RETURN_OF_USER_DEFINED_FUNCTION_WITH_VALUE VARIABLETYPE void bool char short int long unsigned signed float double VARIABLE_TYPE1 PUSH VARIABLETYPE VARIABLE_TYPE2 VARIABLE_TYPE1 VARIABLE_TYPE2 eps VARIABLE_TYPE3 VARIABLE_TYPE1 VARIABLE_TYPE2 L_VALUE VARIABLE_TYPE4 VARIABLE_TYPE4 = EXPRESSION @MOV

◆ VARIABLE_TYPE6

VARIABLE_TYPE5 eps VARIABLE_TYPE5 VARIABLE_TYPE1 VARIABLE_TYPE2 L_VALUE FUNCTION_PARAMETER VARIABLE_TYPE6 VARIABLE_TYPE6