python - Escaping keywords with a slash in my grammar -
I am trying to parse a small subset of Doxygen.
In Doxygen you can avoid commands, then for prepaid \
commands, then there is a short
command and \ abbreviate
Appears in the text.
But I am having trouble finding the escape sequence.
I have defined my rules as follows:
beginSlash = combine ((~ ~ ~ ~ ~ ~ \\) .Pressing () | WordStart ()) + Liberal ('\\' '(' '' '' '' ')) + indexed (anof (r' \ '')) starting = combine (~ limited ('\\'). Pressing () + '@') Start = marker = (start | start slash) .setName ('BeginMarker')
It does not work when trying to match now
assures body .parseString ('this is \ abbreviate') body == 'this is @ short'
it returns
& Gt; Body.parseStrin Claim the g ('this is a \\ @ short') Body == 'This is @ short' E emphasizes that this is a \\ '==' this is a 'short' e - it's a \\ E what does it provide me with some insight, where is my thinking process on the wrong side? I have chosen to separate the markers from the command names, so I will send the code @ or \
Am.
Comments
Post a Comment