Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (33 sloc) 22.1 KB
<?xml version="1.0" encoding="UTF-8"?>
<bgf:grammar xmlns:bgf="http://planet-sl.org/bgf"><!--asm_stmtblock, asm_stm, asmlabel_colon, asm_unlabeledstm_semi, asmid, asmlabel, asm_expr, asm_infix_expr, asm_term, asm_primary, asmhex, asm_unlabeledstm, asm_opcode_prefix, asm_opcode, asm_directive, asm_directive_arg, asm_register, segmt_overr, asm_prefixop, asm_infixop, asm_postfixop, asmlbl, SP, NL, end_struct, sign, colon, label_id, anynumber-->
<root>asm_stmtblock</root>
<bgf:production><nonterminal>asm_stmtblock</nonterminal><bgf:expression><sequence><bgf:expression><terminal>asm</terminal></bgf:expression><bgf:expression><star><bgf:expression><nonterminal>asm_stm</nonterminal></bgf:expression></star></bgf:expression><bgf:expression><nonterminal>end_struct</nonterminal></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_stm</nonterminal><bgf:expression><sequence><bgf:expression><optional><bgf:expression><nonterminal>asmlabel_colon</nonterminal></bgf:expression></optional></bgf:expression><bgf:expression><optional><bgf:expression><nonterminal>asm_unlabeledstm_semi</nonterminal></bgf:expression></optional></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asmlabel_colon</nonterminal><bgf:expression><sequence><bgf:expression><nonterminal>asmlabel</nonterminal></bgf:expression><bgf:expression><nonterminal>colon</nonterminal></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_unlabeledstm_semi</nonterminal><bgf:expression><sequence><bgf:expression><nonterminal>asm_unlabeledstm</nonterminal></bgf:expression><bgf:expression><optional><bgf:expression><terminal>;</terminal></bgf:expression></optional></bgf:expression><bgf:expression><nonterminal>NL</nonterminal></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asmid</nonterminal><bgf:expression><choice><bgf:expression><sequence><bgf:expression><star><bgf:expression><terminal>@</terminal></bgf:expression></star></bgf:expression><bgf:expression><nonterminal>asmlbl</nonterminal></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><star><bgf:expression><terminal>@+</terminal></bgf:expression></star></bgf:expression><bgf:expression><nonterminal>id</nonterminal></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><star><bgf:expression><terminal>@+</terminal></bgf:expression></star></bgf:expression><bgf:expression><nonterminal>anynumber</nonterminal></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><star><bgf:expression><terminal>@+</terminal></bgf:expression></star></bgf:expression><bgf:expression><nonterminal>key</nonterminal></bgf:expression></sequence></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asmlabel</nonterminal><bgf:expression><choice><bgf:expression><plus><bgf:expression><nonterminal>asmid</nonterminal></bgf:expression></plus></bgf:expression><bgf:expression><nonterminal>label_id</nonterminal></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_expr</nonterminal><bgf:expression><sequence><bgf:expression><nonterminal>asm_term</nonterminal></bgf:expression><bgf:expression><star><bgf:expression><nonterminal>asm_infix_expr</nonterminal></bgf:expression></star></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_infix_expr</nonterminal><bgf:expression><sequence><bgf:expression><nonterminal>asm_infixop</nonterminal></bgf:expression><bgf:expression><nonterminal>asm_term</nonterminal></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_term</nonterminal><bgf:expression><sequence><bgf:expression><star><bgf:expression><nonterminal>asm_prefixop</nonterminal></bgf:expression></star></bgf:expression><bgf:expression><nonterminal>asm_primary</nonterminal></bgf:expression><bgf:expression><star><bgf:expression><nonterminal>asm_postfixop</nonterminal></bgf:expression></star></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_primary</nonterminal><bgf:expression><choice><bgf:expression><sequence><bgf:expression><terminal>[</terminal></bgf:expression><bgf:expression><nonterminal>asm_expr</nonterminal></bgf:expression><bgf:expression><terminal>]</terminal></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><terminal>(</terminal></bgf:expression><bgf:expression><nonterminal>asm_expr</nonterminal></bgf:expression><bgf:expression><terminal>)</terminal></bgf:expression></sequence></bgf:expression><bgf:expression><nonterminal>asm_register</nonterminal></bgf:expression><bgf:expression><nonterminal>id</nonterminal></bgf:expression><bgf:expression><nonterminal>anynumber</nonterminal></bgf:expression><bgf:expression><nonterminal>charlit</nonterminal></bgf:expression><bgf:expression><nonterminal>stringlit</nonterminal></bgf:expression><bgf:expression><nonterminal>asmhex</nonterminal></bgf:expression><bgf:expression><sequence><bgf:expression><nonterminal>SP</nonterminal></bgf:expression><bgf:expression><nonterminal>asmlabel</nonterminal></bgf:expression></sequence></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asmhex</nonterminal><bgf:expression><sequence><bgf:expression><nonterminal>number</nonterminal></bgf:expression><bgf:expression><nonterminal>id</nonterminal></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_unlabeledstm</nonterminal><bgf:expression><choice><bgf:expression><sequence><bgf:expression><nonterminal>asm_directive</nonterminal></bgf:expression><bgf:expression><sepliststar><bgf:expression><nonterminal>asm_directive_arg</nonterminal></bgf:expression><bgf:expression><terminal>,</terminal></bgf:expression></sepliststar></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><optional><bgf:expression><nonterminal>asm_opcode_prefix</nonterminal></bgf:expression></optional></bgf:expression><bgf:expression><nonterminal>asm_opcode</nonterminal></bgf:expression><bgf:expression><sepliststar><bgf:expression><nonterminal>asm_expr</nonterminal></bgf:expression><bgf:expression><terminal>,</terminal></bgf:expression></sepliststar></bgf:expression></sequence></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_opcode_prefix</nonterminal><bgf:expression><sequence><bgf:expression><terminal>lock</terminal></bgf:expression><bgf:expression><optional><bgf:expression><nonterminal>space</nonterminal></bgf:expression></optional></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_opcode</nonterminal><bgf:expression><choice><bgf:expression><terminal>adc</terminal></bgf:expression><bgf:expression><terminal>add</terminal></bgf:expression><bgf:expression><terminal>and</terminal></bgf:expression><bgf:expression><terminal>bswap</terminal></bgf:expression><bgf:expression><terminal>bt</terminal></bgf:expression><bgf:expression><terminal>btr</terminal></bgf:expression><bgf:expression><terminal>bts</terminal></bgf:expression><bgf:expression><terminal>call</terminal></bgf:expression><bgf:expression><terminal>cdq</terminal></bgf:expression><bgf:expression><terminal>cld</terminal></bgf:expression><bgf:expression><terminal>cmp</terminal></bgf:expression><bgf:expression><terminal>dec</terminal></bgf:expression><bgf:expression><terminal>div</terminal></bgf:expression><bgf:expression><terminal>f2xm1</terminal></bgf:expression><bgf:expression><terminal>fabs</terminal></bgf:expression><bgf:expression><terminal>fadd</terminal></bgf:expression><bgf:expression><terminal>faddp</terminal></bgf:expression><bgf:expression><terminal>fbstp</terminal></bgf:expression><bgf:expression><terminal>fchs</terminal></bgf:expression><bgf:expression><terminal>fclex</terminal></bgf:expression><bgf:expression><terminal>fcom</terminal></bgf:expression><bgf:expression><terminal>fcomp</terminal></bgf:expression><bgf:expression><terminal>fcos</terminal></bgf:expression><bgf:expression><terminal>fdiv</terminal></bgf:expression><bgf:expression><terminal>fdivp</terminal></bgf:expression><bgf:expression><terminal>fdivrp</terminal></bgf:expression><bgf:expression><terminal>ffree</terminal></bgf:expression><bgf:expression><terminal>fiadd</terminal></bgf:expression><bgf:expression><terminal>fidiv</terminal></bgf:expression><bgf:expression><terminal>fild</terminal></bgf:expression><bgf:expression><terminal>fimul</terminal></bgf:expression><bgf:expression><terminal>fistp</terminal></bgf:expression><bgf:expression><terminal>fld</terminal></bgf:expression><bgf:expression><terminal>fld1</terminal></bgf:expression><bgf:expression><terminal>fldcw</terminal></bgf:expression><bgf:expression><terminal>fldl2e</terminal></bgf:expression><bgf:expression><terminal>fldlg2</terminal></bgf:expression><bgf:expression><terminal>fldln2</terminal></bgf:expression><bgf:expression><terminal>fldz</terminal></bgf:expression><bgf:expression><terminal>fmul</terminal></bgf:expression><bgf:expression><terminal>fmulp</terminal></bgf:expression><bgf:expression><terminal>fnclex</terminal></bgf:expression><bgf:expression><terminal>fninit</terminal></bgf:expression><bgf:expression><terminal>fnstcw</terminal></bgf:expression><bgf:expression><terminal>fnstsw</terminal></bgf:expression><bgf:expression><terminal>fpatan</terminal></bgf:expression><bgf:expression><terminal>fprem</terminal></bgf:expression><bgf:expression><terminal>fptan</terminal></bgf:expression><bgf:expression><terminal>frndint</terminal></bgf:expression><bgf:expression><terminal>fscale</terminal></bgf:expression><bgf:expression><terminal>fsin</terminal></bgf:expression><bgf:expression><terminal>fsincos</terminal></bgf:expression><bgf:expression><terminal>fsqrt</terminal></bgf:expression><bgf:expression><terminal>fstcw</terminal></bgf:expression><bgf:expression><terminal>fstp</terminal></bgf:expression><bgf:expression><terminal>fstsw</terminal></bgf:expression><bgf:expression><terminal>fsub</terminal></bgf:expression><bgf:expression><terminal>fsubp</terminal></bgf:expression><bgf:expression><terminal>fsubr</terminal></bgf:expression><bgf:expression><terminal>fwait</terminal></bgf:expression><bgf:expression><terminal>fxch</terminal></bgf:expression><bgf:expression><terminal>fxtract</terminal></bgf:expression><bgf:expression><terminal>fyl2x</terminal></bgf:expression><bgf:expression><terminal>fyl2xp1</terminal></bgf:expression><bgf:expression><terminal>imul</terminal></bgf:expression><bgf:expression><terminal>inc</terminal></bgf:expression><bgf:expression><terminal>int</terminal></bgf:expression><bgf:expression><terminal>ja</terminal></bgf:expression><bgf:expression><terminal>jae</terminal></bgf:expression><bgf:expression><terminal>jb</terminal></bgf:expression><bgf:expression><terminal>jbe</terminal></bgf:expression><bgf:expression><terminal>jc</terminal></bgf:expression><bgf:expression><terminal>je</terminal></bgf:expression><bgf:expression><terminal>jecxz</terminal></bgf:expression><bgf:expression><terminal>jg</terminal></bgf:expression><bgf:expression><terminal>jge</terminal></bgf:expression><bgf:expression><terminal>jl</terminal></bgf:expression><bgf:expression><terminal>jle</terminal></bgf:expression><bgf:expression><terminal>jmp</terminal></bgf:expression><bgf:expression><terminal>jnc</terminal></bgf:expression><bgf:expression><terminal>jne</terminal></bgf:expression><bgf:expression><terminal>jnl</terminal></bgf:expression><bgf:expression><terminal>jns</terminal></bgf:expression><bgf:expression><terminal>jnz</terminal></bgf:expression><bgf:expression><terminal>jo</terminal></bgf:expression><bgf:expression><terminal>jp</terminal></bgf:expression><bgf:expression><terminal>js</terminal></bgf:expression><bgf:expression><terminal>jz</terminal></bgf:expression><bgf:expression><terminal>lea</terminal></bgf:expression><bgf:expression><terminal>leave</terminal></bgf:expression><bgf:expression><terminal>lodsb</terminal></bgf:expression><bgf:expression><terminal>lodsw</terminal></bgf:expression><bgf:expression><terminal>loop</terminal></bgf:expression><bgf:expression><terminal>mov</terminal></bgf:expression><bgf:expression><terminal>movsb</terminal></bgf:expression><bgf:expression><terminal>movsx</terminal></bgf:expression><bgf:expression><terminal>movzx</terminal></bgf:expression><bgf:expression><terminal>mul</terminal></bgf:expression><bgf:expression><terminal>neg</terminal></bgf:expression><bgf:expression><terminal>not</terminal></bgf:expression><bgf:expression><terminal>or</terminal></bgf:expression><bgf:expression><terminal>pop</terminal></bgf:expression><bgf:expression><terminal>popfd</terminal></bgf:expression><bgf:expression><terminal>push</terminal></bgf:expression><bgf:expression><terminal>pushfd</terminal></bgf:expression><bgf:expression><terminal>rcl</terminal></bgf:expression><bgf:expression><terminal>rcr</terminal></bgf:expression><bgf:expression><terminal>rep</terminal></bgf:expression><bgf:expression><terminal>repe</terminal></bgf:expression><bgf:expression><terminal>repne</terminal></bgf:expression><bgf:expression><terminal>ret</terminal></bgf:expression><bgf:expression><terminal>rol</terminal></bgf:expression><bgf:expression><terminal>ror</terminal></bgf:expression><bgf:expression><terminal>sahf</terminal></bgf:expression><bgf:expression><terminal>sar</terminal></bgf:expression><bgf:expression><terminal>sbb</terminal></bgf:expression><bgf:expression><terminal>seto</terminal></bgf:expression><bgf:expression><terminal>shl</terminal></bgf:expression><bgf:expression><terminal>shld</terminal></bgf:expression><bgf:expression><terminal>shr</terminal></bgf:expression><bgf:expression><terminal>shrd</terminal></bgf:expression><bgf:expression><terminal>std</terminal></bgf:expression><bgf:expression><terminal>stosb</terminal></bgf:expression><bgf:expression><terminal>stosd</terminal></bgf:expression><bgf:expression><terminal>stosw</terminal></bgf:expression><bgf:expression><terminal>sub</terminal></bgf:expression><bgf:expression><terminal>test</terminal></bgf:expression><bgf:expression><terminal>wait</terminal></bgf:expression><bgf:expression><terminal>xadd</terminal></bgf:expression><bgf:expression><terminal>xchg</terminal></bgf:expression><bgf:expression><terminal>xor</terminal></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_directive</nonterminal><bgf:expression><choice><bgf:expression><terminal>DB</terminal></bgf:expression><bgf:expression><terminal>DW</terminal></bgf:expression><bgf:expression><terminal>DD</terminal></bgf:expression><bgf:expression><terminal>DQ</terminal></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_directive_arg</nonterminal><bgf:expression><choice><bgf:expression><nonterminal>charlit</nonterminal></bgf:expression><bgf:expression><sequence><bgf:expression><optional><bgf:expression><nonterminal>sign</nonterminal></bgf:expression></optional></bgf:expression><bgf:expression><nonterminal>anynumber</nonterminal></bgf:expression></sequence></bgf:expression><bgf:expression><nonterminal>asm_expr</nonterminal></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_register</nonterminal><bgf:expression><choice><bgf:expression><sequence><bgf:expression><terminal>ST</terminal></bgf:expression><bgf:expression><terminal>(</terminal></bgf:expression><bgf:expression><nonterminal>integernumber</nonterminal></bgf:expression><bgf:expression><terminal>)</terminal></bgf:expression></sequence></bgf:expression><bgf:expression><terminal>ST</terminal></bgf:expression><bgf:expression><terminal>FS</terminal></bgf:expression><bgf:expression><terminal>GS</terminal></bgf:expression><bgf:expression><terminal>EAX</terminal></bgf:expression><bgf:expression><terminal>EBX</terminal></bgf:expression><bgf:expression><terminal>ECX</terminal></bgf:expression><bgf:expression><terminal>EDX</terminal></bgf:expression><bgf:expression><terminal>ESP</terminal></bgf:expression><bgf:expression><terminal>EBP</terminal></bgf:expression><bgf:expression><terminal>ESI</terminal></bgf:expression><bgf:expression><terminal>EDI</terminal></bgf:expression><bgf:expression><terminal>AX</terminal></bgf:expression><bgf:expression><terminal>BX</terminal></bgf:expression><bgf:expression><terminal>CX</terminal></bgf:expression><bgf:expression><terminal>DX</terminal></bgf:expression><bgf:expression><terminal>SP</terminal></bgf:expression><bgf:expression><terminal>BP</terminal></bgf:expression><bgf:expression><terminal>SI</terminal></bgf:expression><bgf:expression><terminal>DI</terminal></bgf:expression><bgf:expression><terminal>AL</terminal></bgf:expression><bgf:expression><terminal>BL</terminal></bgf:expression><bgf:expression><terminal>CL</terminal></bgf:expression><bgf:expression><terminal>DL</terminal></bgf:expression><bgf:expression><terminal>CS</terminal></bgf:expression><bgf:expression><terminal>DS</terminal></bgf:expression><bgf:expression><terminal>SS</terminal></bgf:expression><bgf:expression><terminal>ES</terminal></bgf:expression><bgf:expression><terminal>AH</terminal></bgf:expression><bgf:expression><terminal>BH</terminal></bgf:expression><bgf:expression><terminal>CH</terminal></bgf:expression><bgf:expression><terminal>DH</terminal></bgf:expression><bgf:expression><sequence><bgf:expression><terminal>CS</terminal></bgf:expression><bgf:expression><optional><bgf:expression><nonterminal>segmt_overr</nonterminal></bgf:expression></optional></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><terminal>DS</terminal></bgf:expression><bgf:expression><optional><bgf:expression><nonterminal>segmt_overr</nonterminal></bgf:expression></optional></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><terminal>SS</terminal></bgf:expression><bgf:expression><optional><bgf:expression><nonterminal>segmt_overr</nonterminal></bgf:expression></optional></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><terminal>FS</terminal></bgf:expression><bgf:expression><optional><bgf:expression><nonterminal>segmt_overr</nonterminal></bgf:expression></optional></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><terminal>GS</terminal></bgf:expression><bgf:expression><optional><bgf:expression><nonterminal>segmt_overr</nonterminal></bgf:expression></optional></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><terminal>ES</terminal></bgf:expression><bgf:expression><optional><bgf:expression><nonterminal>segmt_overr</nonterminal></bgf:expression></optional></bgf:expression></sequence></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>segmt_overr</nonterminal><bgf:expression><sequence><bgf:expression><terminal>:</terminal></bgf:expression><bgf:expression><nonterminal>asm_expr</nonterminal></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_prefixop</nonterminal><bgf:expression><choice><bgf:expression><terminal>high</terminal></bgf:expression><bgf:expression><terminal>low</terminal></bgf:expression><bgf:expression><terminal>offset</terminal></bgf:expression><bgf:expression><terminal>dmtindex</terminal></bgf:expression><bgf:expression><terminal>vmtoffset</terminal></bgf:expression><bgf:expression><terminal>type</terminal></bgf:expression><bgf:expression><terminal>not</terminal></bgf:expression><bgf:expression><terminal>&amp;</terminal></bgf:expression><bgf:expression><nonterminal>sign</nonterminal></bgf:expression><bgf:expression><terminal>@</terminal></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_infixop</nonterminal><bgf:expression><choice><bgf:expression><terminal>.</terminal></bgf:expression><bgf:expression><terminal>+</terminal></bgf:expression><bgf:expression><terminal>-</terminal></bgf:expression><bgf:expression><terminal>*</terminal></bgf:expression><bgf:expression><terminal>/</terminal></bgf:expression><bgf:expression><terminal>ptr</terminal></bgf:expression><bgf:expression><terminal>mod</terminal></bgf:expression><bgf:expression><terminal>xor</terminal></bgf:expression><bgf:expression><terminal>and</terminal></bgf:expression><bgf:expression><terminal>or</terminal></bgf:expression><bgf:expression><terminal>shr</terminal></bgf:expression><bgf:expression><terminal>shl</terminal></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asm_postfixop</nonterminal><bgf:expression><choice><bgf:expression><sequence><bgf:expression><terminal>[</terminal></bgf:expression><bgf:expression><nonterminal>asm_expr</nonterminal></bgf:expression><bgf:expression><terminal>]</terminal></bgf:expression></sequence></bgf:expression><bgf:expression><sequence><bgf:expression><terminal>.</terminal></bgf:expression><bgf:expression><nonterminal>asm_expr</nonterminal></bgf:expression></sequence></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>asmlbl</nonterminal><bgf:expression><terminal>@(\\d+\\u+\\i*)</terminal></bgf:expression>
</bgf:production><bgf:production><nonterminal>SP</nonterminal><bgf:expression><terminal> </terminal></bgf:expression>
</bgf:production><bgf:production><nonterminal>NL</nonterminal><bgf:expression><terminal>\\n</terminal></bgf:expression>
</bgf:production><bgf:production><nonterminal>end_struct</nonterminal><bgf:expression><terminal>end</terminal></bgf:expression>
</bgf:production><bgf:production><nonterminal>sign</nonterminal><bgf:expression><choice><bgf:expression><terminal>+</terminal></bgf:expression><bgf:expression><terminal>-</terminal></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>colon</nonterminal><bgf:expression><terminal>:</terminal></bgf:expression>
</bgf:production><bgf:production><nonterminal>label_id</nonterminal><bgf:expression><choice><bgf:expression><nonterminal>anynumber</nonterminal></bgf:expression><bgf:expression><nonterminal>id</nonterminal></bgf:expression></choice></bgf:expression>
</bgf:production><bgf:production><nonterminal>anynumber</nonterminal><bgf:expression><choice><bgf:expression><nonterminal>hexnumber</nonterminal></bgf:expression><bgf:expression><nonterminal>number</nonterminal></bgf:expression></choice></bgf:expression>
</bgf:production></bgf:grammar>