I am creating a small text editor that has C # code. Is there any way from within the program itself, regardless, to check if the syntax is correct?
Note: I'm not using C # to do the text editor. I'm just after a syntax algorithm. It can be in any language, it is easy to convert.
My goal is not to find a library that does everything but an open algorithm. It seems to me that something related to BNF can help me.