vishparshav1 wrote
can it be written in c also
Yes, you could write the VM translator (and the Jack compiler) in C, but it would be difficult since C does not have built in collection data types. You would need to write your own data structures to support symbol look up, or search for suitable libraries on the internet. String parsing is also tricky in C; you'll be doing lots of strchar(), strpbrk(), etc. calls and lots of pointer work.
An object oriented language is also quite helpful so that you can have your symbol table, etc., contain symbol objects that themselves contain the required symbols' information.
C++ would be a better choice since it is OO and has the Standard Template Library, but is is a big learning curve over C.
Languages like Python and Ruby have very powerful collection data types that are easy to use, and much better string handling. Because they are interpreted languages rather than compiled, they also make it easier to debug your programs.
Did you write your Hack Assembler in C?
--Mark