UDL assymetric delimiters



  • I am trying to define a language that has the usual () and [] delimiters, and also it has [,) and (,]
    I tried to set delimiter 1 open ( close ) ] and deimiter2 open [ close ) ] but that doesn’t work.
    eg.
    range [a, b]
    range [a, b)
    range (a, b]

    Ideas anybody?



  • @Baksa-Péter

    can be achieved by using the special operator (( )).
    From the document

    So, if two or more strings are defined inside of a special operator (( )), they are interchangeable.

    so a open like (( ( [ )) and a closing like (( ) ] )) sholud do the trick

    Cheers
    Claudia


Log in to reply