csv0i_p dict f = f<$>condition<*>branchpred<*>(iLabel dict)
csv0i_p' f = f<$>condition<*>branchpred
csv1 f = f<$>condition<%>reg
+csv1' f = f<$>condition
csv1_p f = f<$>condition<%>reg
csv2 f = f<$>condition<%>reg<.>reg
csv2i dict f = f<$>condition<%>reg<.>(iLit16 dict)
ars dict = ins "ars" (csv2i_d dict) $ shiform 0x0a 1 1 0
-- memory
pop _ = ins "pop" csv1 $ sform 0x0b 0x0
-disc _ = ins "disc" csv1 $ sform 0x0b 0x1
+disc _ = ins "disc" csv1' $ sform' 0x0b 0x1 0
fetch _ = ins "fetch" csv1 $ sform 0x0b 0x2
push _ = ins "push" csv1 $ sform 0x0b 0x3
movpf _ = ins "movpf" csv1 $ sform 0x0c 0x2
bform' opcd typ cond bp = bform opcd typ 0 cond bp 0
sform opcd typ cond rd = pack [(cond,28),(opcd,23),(rd,19),(typ,17)]
+sform' opcd typ rd cond = sform opcd typ cond rd
brrform opcd typ cond ra = pack [(cond,28),(opcd,23),(ra,19),(typ,2)]
+BUGS:
+- parsers2/eval: kann nur "0-1" und ned "-1" auswerten
+- parsers1: fail bei zeile mit tab/blanks only
+- parsers2/eval: aufloesen von zwei labels x und y funktioniert nicht, wenn x ein
+ echter prefix von y ist (longest input match anyone?)
+- parsers2/eval: klammern bei ausdruecken (und zwar im asm, ned expr selbst...)
+- parsers2: bei instr branches addresse durch 4 rechnen (ldi vorm brr -> RAGE)
+
+WUENSCHE:
+- vernuenftige zeilenangabe bei fehlermeldungen
+- eval: bitoperatoren
+
+
+===============================================================================
Beschreibung:
Der Parser braucht zwei Durchlaeufe. Der erste Durchlauf loest z.b. Labels auf
- .data <- done (wenn man nett ist, springt man nicht lustig zwischen diesen
- .text <- done (sections hin und her... es *sollte* zwar gehen, aber [...] :p)
-- .include <- TODO: zu umstaendlich? :/ Mal schaun ob mir eine einfache Loesung
- einfaellt. Eventuell mit gcc drueberfahren
+- .include <- done (thx @ gcc)
- .org <- done
- .fill aufloesen <- TODO: atm nur einmalig 32bit moeglich
- .define tabelle <- done
einschraenkungen atm:
- gleicher Namensraum fuer labels in .text und .data! wenn einer ein Label aus
.data laedt und dann aber eigentlich auf .text zugreift ist er selber schuld :/
-- Expr geht zwar, aber nicht geklammert
-- In manchen situationen kanns den parser noch an den einen oder anderen Space
- oder Tab herhauen, also lieb sein!
-- viele viele mehr *testbench schreiben muss*