askhad-apishev / corewar

0 stars 0 forks source link

Asm task 06 #32

Closed akaruitori closed 4 years ago

akaruitori commented 4 years ago

Adding parsing & validation of both header and code of .s-file Basically the program goes down by the linked list of lines (skipping empty lines\comments), saving all the needed data by the way. If something is not right it calls the fill_error() function which initializes struct error_data and saves all data needed to print a nice error message. As something may go wrong at about every symbol there are quite a lot of checks. Known bugs\features: the program does not even look at the end of the line if it got all the information it wanted, there could be anything as long as at the beginning of the line is a correct operation; the '^' in error messages does not always points where it should've (as the main goal of this update is file validation, and not pretty printing).