working on prehod 2...
This commit is contained in:
parent
f79aa96359
commit
6261d9fe37
6 changed files with 84 additions and 27 deletions
|
|
@ -35,7 +35,7 @@ let prviPrehod (code : lineSemantic list) : int*lineSemantic list*symtab=
|
|||
(*while opcode != END loop*)
|
||||
let rec loop ostaliUkazi prgLen intermediateFileList =
|
||||
match ostaliUkazi with
|
||||
| [] -> prgLen, (List.rev intermediateFileList), simtab (*smo konec*)
|
||||
| [] -> failwith "no END mnemonic at the end of the code!"
|
||||
| x :: _ when x.opcode = END -> (*konec while loopa*) (*write last line to intermediate file, save the locctr - st addr as prg len*)
|
||||
x.loc <- Some !locctr;
|
||||
let intermediateFileList = x :: intermediateFileList in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue