I need to write a parser for a programming language with a fairly complex syntax. (Landmarks: Ruby, Smalltalk). It is necessary to disassemble operators with different priority.
How to make it easier and more convenient? Speed is not so important.
UPD :
The list of syntax features that you will have to parse:
- Optional brackets when calling the method.
- Operators with priorities (Priorities are fixed in advance)
- Indentation is used to denote the arguments of the operator transferred to a new line.
Example code to parse: here
UPD : The book of the dragon is not yet read, but on the way.
UPD : Another question is how bad it will be if my parser will only parse the code by loading the entire source into memory? For a programming language, is it fatal?