Event comment commands are broken down into two codes
108 - comment begins408 - more comments408 - more comments......Everytime you press enter in the comment editor, the editor creates a 408 command.The easiest way to join the comments is basically what the interpreter does: read a 108, then join all of the following 408's separated by new-line characters.
However, what if you were doing some regex parsing like this
<this is some really long tag name:which happens to continue on the second line>This will be split into two lines rather than a single line, and your regex will need to support multiple lines. Which is not a problem.Lately, I have been writing note-tags of the form
<tag name>option: valueoption: valueoption: value</tag name>And I split on new-lines, since that would be a logical delimiter. However, when I apply this to comments, the problem appears again: if one of your values happens to be really long, it's going to overflow into the next line, and suddenly my parser fails because something like
Will incorrectly parse the condition.What is a good way to parse tags in an event comment?
Or should I use a different delimiter? Maybe semi-colons or something.
108 - comment begins408 - more comments408 - more comments......Everytime you press enter in the comment editor, the editor creates a 408 command.The easiest way to join the comments is basically what the interpreter does: read a 108, then join all of the following 408's separated by new-line characters.
However, what if you were doing some regex parsing like this
<this is some really long tag name:which happens to continue on the second line>This will be split into two lines rather than a single line, and your regex will need to support multiple lines. Which is not a problem.Lately, I have been writing note-tags of the form
<tag name>option: valueoption: valueoption: value</tag name>And I split on new-lines, since that would be a logical delimiter. However, when I apply this to comments, the problem appears again: if one of your values happens to be really long, it's going to overflow into the next line, and suddenly my parser fails because something like
Code:
<tag name>condition: some really long formula that spans on two linesname: value</tag name>
Or should I use a different delimiter? Maybe semi-colons or something.