parsing - How are parsers made graceful and continue working even on compile errors? -


i have build myself parsers different computer languages. thought using antlr want explore myself because dislike idea of generated code (yeah silly know).

the question how compile errors (missing identifiers, wrong token rule etc.) handled , represented within asts etc.

what know compiler lectures parser tries throw away token or try find next matching code element (like missing ';' , taking ';' of next expression).

but how expressed within ast. there malformed expression object/type? bit puzzled.

i not want reject input handle it.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -