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
Post a Comment