1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 00:59:31 +00:00

Allow any character to be escaped

This commit is contained in:
Étienne Fildadut 2022-09-14 15:42:02 +09:00
parent d1f49d1894
commit 4284b06f10
6 changed files with 103 additions and 95 deletions

View file

@ -1,70 +1,91 @@
local _={}
_[25]={}
_[24]={}
_[23]={}
_[22]={}
_[21]={text="escaping expressions abc and {stuff} \\ and quotes \"",tags=_[25]}
_[20]={text=" {braces}",tags=_[24]}
_[19]={text="\9",tags=_[24]}
_[18]={text=" ",tags=_[24]}
_[17]={text="\\",tags=_[24]}
_[16]={text=" ",tags=_[24]}
_[15]={text="\n",tags=_[24]}
_[14]={text="other codes ",tags=_[24]}
_[13]={text="\"",tags=_[23]}
_[12]={text="quote ",tags=_[23]}
_[11]={text="a",tags=_[22]}
_[10]={text="expression ",tags=_[22]}
_[9]={_[21]}
_[8]={_[14],_[15],_[16],_[17],_[18],_[19],_[20]}
_[39]={}
_[38]={}
_[37]={}
_[36]={}
_[35]={}
_[34]={}
_[33]={}
_[32]={}
_[31]={}
_[30]={}
_[29]={}
_[28]={}
_[27]={}
_[26]={}
_[25]={tags=_[39],text="\194\163"}
_[24]={tags=_[38],text="generic symbol "}
_[23]={tags=_[37],text="escaping expressions abc and {stuff} \\ and quotes \""}
_[22]={tags=_[36],text=" {braces}"}
_[21]={tags=_[35],text="\9"}
_[20]={tags=_[34],text=" "}
_[19]={tags=_[33],text="\\"}
_[18]={tags=_[32],text=" "}
_[17]={tags=_[31],text="\n"}
_[16]={tags=_[30],text="other codes "}
_[15]={tags=_[29],text="\""}
_[14]={tags=_[28],text="quote "}
_[13]={tags=_[27],text="a"}
_[12]={tags=_[26],text="expression "}
_[11]={_[24],_[25]}
_[10]={_[23]}
_[9]={_[16],_[17],_[18],_[19],_[20],_[21],_[22]}
_[8]={_[14],_[15]}
_[7]={_[12],_[13]}
_[6]={_[10],_[11]}
_[5]={"return"}
_[4]={"text",_[9]}
_[3]={"text",_[8]}
_[2]={"text",_[7]}
_[1]={"text",_[6]}
return {_[1],_[2],_[3],_[4],_[5]}
_[6]={"return"}
_[5]={"text",_[11]}
_[4]={"text",_[10]}
_[3]={"text",_[9]}
_[2]={"text",_[8]}
_[1]={"text",_[7]}
return {_[1],_[2],_[3],_[4],_[5],_[6]}
--[[
{ "text", { {
tags = <1>{},
tags = {},
text = "expression "
}, {
tags = <table 1>,
tags = {},
text = "a"
} } }
{ "text", { {
tags = <1>{},
tags = {},
text = "quote "
}, {
tags = <table 1>,
tags = {},
text = '"'
} } }
{ "text", { {
tags = <1>{},
tags = {},
text = "other codes "
}, {
tags = <table 1>,
tags = {},
text = "\n"
}, {
tags = <table 1>,
tags = {},
text = " "
}, {
tags = <table 1>,
tags = {},
text = "\\"
}, {
tags = <table 1>,
tags = {},
text = " "
}, {
tags = <table 1>,
tags = {},
text = "\t"
}, {
tags = <table 1>,
tags = {},
text = " {braces}"
} } }
{ "text", { {
tags = {},
text = 'escaping expressions abc and {stuff} \\ and quotes "'
} } }
{ "text", { {
tags = {},
text = "generic symbol "
}, {
tags = {},
text = "£"
} } }
{ "return" }
]]--