source: trunk/minix/commands/i386/asmconv/syntax.ack@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.6 KB
Line 
1asmprog:
2 comment ?
3 statement
4 asmprog ; asmprog
5 asmprog comment ? \n asmprog
6
7letter:
8 [._a-zA-Z]
9
10digit:
11 [0-9]
12
13identifier:
14 letter (letter | digit)*
15 digit [bf]
16
17string:
18 'C-like string sequence'
19 "C-like string sequence"
20
21number:
22 C-like number
23
24comment:
25 ! .*
26
27statement:
28 label-definition statement
29 empty
30 assignment
31 instruction
32 pseudo-instruction
33
34label-definition:
35 identifier :
36 digit :
37
38assignment:
39 identifier = expression
40
41instruction:
42 iX86-instruction
43
44pseudo-instruction:
45 .extern identifier (, identifier)*
46 .define identifier (, identifier)*
47 .data1 expression (, expression)*
48 .data2 expression (, expression)*
49 .data4 expression (, expression)*
50 .ascii string
51 .asciz string
52 .align expression
53 .space expression
54 .comm identifier , expression
55 .sect identifier
56 .base expression
57 .assert expression
58 .symb XXX
59 .line XXX
60 .file XXX
61 .nolist
62 .list
63 iX86-pseudo
64
65expression:
66 C-like expression with [ and ] for grouping
67
68iX86-instruction:
69 prefix
70 prefix iX86-instruction
71 identifier
72 identifier iX86operand
73 identifier iX86operand , iX86operand
74 identifier iX86operand : iX86operand
75
76prefix:
77 o16
78 o32
79 a16
80 a32
81 rep
82 repz
83 repnz
84 repe
85 repne
86 cseg | dseg | eseg | fseg | gseg | sseg
87
88iX86operand:
89 register
90 ( register )
91 expression
92 ( expression )
93 expression ( register )
94 expression ( register * [1248] )
95 expression ? ( register ) ( register )
96 expression ? ( register ) ( register * [1248] )
97
98register:
99 al | bl | cl | dl | ah | bh | ch | dh
100 ax | bx | cx | dx | si | di | bp | sp
101 eax | ebx | ecx | edx | esi | edi | ebp | esp
102 cs | ds | es | fs | gs | ss
103 cr0 | cr1 | cr2 | cr3
104
105iX86-pseudo:
106 .use16
107 .use32
Note: See TracBrowser for help on using the repository browser.