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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -