0

Using rail I try to generate a syntax diagramm that has to include curly brackets. For everything else, rail works fine for me but whenever i try something like:

    \begin{rail}        
    DefiningQuery: 
    '\textbraceleft' + 'B'
    \end{rail} 

it generatetes the following .rai file:

    \rail@i{1}{ DefiningQuery: '\T1\textbraceleft ' + 'B' }

and this .rao file:

    % This file was generated by 'rail' from 'Thesis.rai'
    \rail@i {1}{ DefiningQuery: '\T1\textbraceleft ' + 'B' }
    \rail@o {1}{
    \rail@begin{2}{DefiningQuery}
    \rail@plus
    \rail@term{\T1\textbraceleft }[]
    \rail@nextplus{1}
    \rail@cterm{B}[]
    \rail@endplus
    \rail@end
    }

Sadly trying to build my latex document with this .rao file results only in this:

output

Does anyone has an idea on how I can fix this or how to use curly brackets correctly with rail?

0

It works if you define the curly braces as terminal identifiers as described in section 4.2 of the ReadMe:

\railalias{lbrace}{\{}
\railalias{rbrace}{\}}
\railterm{lbrace,rbrace}

\begin{rail}    
    DefiningQuery: 
   lbrace + 'B'
\end{rail}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.