Sublime Forum

How to deal with embedded preprocessors when defining syntax

#1

I’m making syntax defination for a command language, there are preprocessors (those in ]) in source which break the structure of other sentences.

do i=1:27]
dm $Q56R
=do j=1:7]$Q56~j]/,end j]f99,
*end i]

if $Q56hr2/50, m $Q56R2/50,
if $Q56hr2/51, m $Q56R2/51,
if $Q56hr2/60, m $Q56R2/60,

dm $ColHeader =$city/1-3,$b6/1-2,*do i=1:3]do j=1:2]$city/.$b6/[j],*end j]*end i]

The command sentence always start with a command like “dm”, “if”, and “m” etc, and end with “,”, but the preprocessor break all of them up, they are not logically consistent with the language. How can I deal with this situation, thanks.***

0 Likes