Skip to content

Commit

Permalink
FEAT: removes percent-encoding from files, uses double-quotes when ne…
Browse files Browse the repository at this point in the history
…eded instead.
  • Loading branch information
dockimbel committed May 5, 2020
1 parent 2e0b206 commit cc15d58
Show file tree
Hide file tree
Showing 9 changed files with 236 additions and 242 deletions.
6 changes: 2 additions & 4 deletions docs/lexer/lexer-FSM.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ S_SKIP_STR;S_LINE_STR;S_LINE_STR;S_LINE_STR;S_LINE_STR;S_LINE_STR;S_LINE_STR;S_L
S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;T_MSTR_OP;T_MSTR_CL;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_SKIP_MSTR;S_M_STRING;S_M_STRING;T_ERROR;T_ERROR
S_SKIP_MSTR;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;S_M_STRING;T_ERROR;T_EOF
S_FILE_1ST;T_WORD;T_WORD;S_FILE;S_FILE;T_WORD;T_WORD;T_WORD;T_WORD;S_HERDOC_ST;T_WORD;S_FILE_STR;S_FILE;S_FILE;S_PERCENT;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_HDPER_ST;S_FILE;T_WORD;T_WORD;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;T_ERROR;T_WORD
S_FILE;T_FILE;T_FILE;S_FILE;S_FILE;T_FILE;T_FILE;T_FILE;T_FILE;T_FILE;T_FILE;T_ERROR;S_FILE;S_FILE;T_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE_HEX1;S_FILE;T_FILE;T_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;T_ERROR;T_FILE
S_FILE_HEX1;T_ERROR;T_ERROR;S_FILE_HEX2;S_FILE_HEX2;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;S_FILE_HEX2;S_FILE_HEX2;S_FILE_HEX2;S_FILE_HEX2;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR
S_FILE_HEX2;T_ERROR;T_ERROR;S_FILE;S_FILE;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;S_FILE_HEX2;S_FILE_HEX2;S_FILE;S_FILE;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR
S_FILE;T_FILE;T_FILE;S_FILE;S_FILE;T_FILE;T_FILE;T_FILE;T_FILE;T_FILE;T_FILE;T_ERROR;S_FILE;S_FILE;T_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;T_FILE;T_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;S_FILE;T_ERROR;T_FILE
S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;T_FILE;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;S_FILE_STR;T_ERROR;T_ERROR
S_HDPER_ST;T_WORD;T_WORD;S_FILE_HEX2;S_FILE_HEX2;T_WORD;T_WORD;T_WORD;T_WORD;S_HERDOC_ST;T_WORD;T_WORD;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;S_FILE_HEX2;S_FILE_HEX2;S_FILE_HEX2;S_FILE_HEX2;T_ERROR;T_WORD;T_ERROR;T_ERROR;T_ERROR;S_HDPER_ST;T_ERROR;T_WORD;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_WORD
S_HDPER_ST;T_WORD;T_WORD;T_ERROR;T_ERROR;T_WORD;T_WORD;T_WORD;T_WORD;S_HERDOC_ST;T_WORD;T_WORD;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_WORD;T_ERROR;T_ERROR;T_ERROR;S_HDPER_ST;T_ERROR;T_WORD;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_WORD
S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HDPER_C0;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;T_ERROR;T_ERROR
S_HDPER_C0;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HDPER_C0;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HDPER_CL;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;S_HERDOC_ST;T_ERROR;T_ERROR
S_HDPER_CL;T_RAWSTRING;T_RAWSTRING;T_ERROR;T_ERROR;T_RAWSTRING;T_RAWSTRING;T_RAWSTRING;T_RAWSTRING;T_RAWSTRING;T_ERROR;T_RAWSTRING;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_RAWSTRING;T_ERROR;T_ERROR;S_HDPER_CL;T_ERROR;T_RAWSTRING;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_ERROR;T_RAWSTRING
Expand Down
Binary file modified docs/lexer/lexer-FSM.xlsx
Binary file not shown.
37 changes: 15 additions & 22 deletions docs/lexer/lexer-states.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ S_M_STRING
S_SKIP_MSTR
S_FILE_1ST
S_FILE
S_FILE_HEX1
S_FILE_HEX2
S_FILE_STR
S_HDPER_ST
S_HERDOC_ST
Expand Down Expand Up @@ -185,26 +183,21 @@ S_START->"/"->S_SLASH->not(delimit1)->S_SLASH
\->delimit1->T_REFINE

S_START->"%"->S_FILE_1ST->not(delimit8)->S_FILE->not(delimit1)->S_FILE
\ \->"%"->S_FILE_HEX1->hexa->S_FILE_HEX2->hexa->S_FILE
\ \ \ \->not(hexa)->T_ERROR
\ \ \->not(hexa)->T_ERROR
\ \
\ \->delimit1->T_FILE
\
\->dbl-quote->S_FILE_STR->not(dbl-quote)->S_FILE_STR
\ \->dbl-quote->T_FILE
\
\->"%"->S_HDPER_ST->"%"->S_HDPER_ST
\ \->"{"->S_HERDOC_ST
\ \->hexa->S_FILE_HEX2
\ \->delimit7->T_WORD
\ \->else->T_ERROR
\
\->"{"->S_HERDOC_ST->"}"->S_HDPER_C0->"%"->S_HDPER_CL->"%"->S_HDPER_CL
\ \ \ \->else->T_RAWSTRING
\ \ \->else->S_HERDOC_ST
\ \->else->S_HERDOC_ST
\->delimit8->T_WORD
\ \->delimit1->T_FILE
\
\->dbl-quote->S_FILE_STR->not(dbl-quote)->S_FILE_STR
\ \->dbl-quote->T_FILE
\
\->"%"->S_HDPER_ST->"%"->S_HDPER_ST
\ \->"{"->S_HERDOC_ST
\ \->delimit7->T_WORD
\ \->else->T_ERROR
\
\->"{"->S_HERDOC_ST->"}"->S_HDPER_C0->"%"->S_HDPER_CL->"%"->S_HDPER_CL
\ \ \ \->else->T_RAWSTRING
\ \ \->else->S_HERDOC_ST
\ \->else->S_HERDOC_ST
\->delimit8->T_WORD


S_START->"#"->S_SHARP->"{"->S_BINARY->hexa|ws->S_BINARY
Expand Down
26 changes: 24 additions & 2 deletions runtime/datatypes/file.reds
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,13 @@ file: context [
s [series!]
unit [integer!]
cp [integer!]
idx [integer!]
p [byte-ptr!]
p4 [int-ptr!]
head [byte-ptr!]
tail [byte-ptr!]
empty? [logic!]
esc? [logic!]
][
#if debug? = yes [if verbose > 0 [print-line "file/mold"]]

Expand All @@ -206,15 +208,35 @@ file: context [
either empty? [
string/concatenate-literal buffer {""}
][
while [p < tail][
while [p < tail][ ;-- prescan for special characters
cp: switch unit [
Latin1 [as-integer p/value]
UCS-2 [(as-integer p/2) << 8 + p/1]
UCS-4 [p4: as int-ptr! p p4/value]
]
string/append-escaped-char buffer cp string/ESC_URL all?
idx: cp + 1
if all [
cp < MAX_URL_CHARS
string/escape-url-chars/idx = (as byte! string/ESC_URL)
][
break
]
p: p + unit
]
esc?: p < tail
p: head
if esc? [string/append-char GET_BUFFER(buffer) as-integer #"^""]

while [p < tail][ ;-- generate the molded version
cp: switch unit [
Latin1 [as-integer p/value]
UCS-2 [(as-integer p/2) << 8 + p/1]
UCS-4 [p4: as int-ptr! p p4/value]
]
string/append-char GET_BUFFER(buffer) cp
p: p + unit
]
if esc? [string/append-char GET_BUFFER(buffer) as-integer #"^""]
]
part - ((as-integer tail - head) >> (log-b unit)) - 1
]
Expand Down
162 changes: 78 additions & 84 deletions runtime/lexer-transitions.reds
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Red/System [
S_SKIP_MSTR
S_FILE_1ST
S_FILE
S_FILE_HEX1
S_FILE_HEX2
S_FILE_STR
S_HDPER_ST
S_HERDOC_ST
Expand Down Expand Up @@ -103,90 +101,86 @@ Red/System [
skip-table: #{
0100000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00
00000000000000000000000000000000000000000000000000000000000000
}
type-table: #{
000007070707080808080807070707130F1429000A0A00140B0C0C0C0C0C272F
2B2B25253131310B0F0B2C2C2C2C0F0F0C0F0F100F092D32190B0F0F140F0000
2200000000000700000000070F140B130A0829260C0C272F252B312C092D0B07
32
00000707070708080807070707130F1429000A0A00140B0C0C0C0C0C272F2B2B
25253131310B0F0B2C2C2C2C0F0F0C0F0F100F092D32190B0F0F140F00002200
000000000700000000070F140B130A0829260C0C272F252B312C092D0B0732
}
transitions: #{
0000181841424344454002113131323232322732270F402A3232064001372F24
2E2E403232403F014A0101010101010101010101010101010101010101010101
010101010101010101010101403F020202020202020202024B02020202020202
0202020202020202020202020202020203020240400202020202020202020202
0202020202020202020202020202020202020202020202020202403F04040404
0404040445460404040404040404040404040404040404040404040404040504
0440400404040404040404040404040404040404040404040404040404040404
0404040404040404403F4C4C07074C4C4C4C0C4C0A0707340707070707070707
070707070B074C4C07070707070707404C515107075151515151514007075107
0707070707070707070707080751510707070707070740514040090940404040
4040404040404040400909090940404040404040404040404040404040404040
4007074040404040404040404040404009090707404040404040404040404040
4040404040400A0A0A0A0A0A0A0A0A0A510A0A0A0A0A0A0A0A0A0A0A0A0A0A0A
0A0A0A0A0A0A0A0A0A0A0A40404C4C09094C4C4C4C0C4C4C4040404040400909
0909404C4040400B404C4040404040404040404C0C0C0C0C0C0C0C0C0C0D0C0C
0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C40400C0C0C0C0C
0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0C0C0C0C0C0C0C0C0C0C
40405F5F40405F5F5F5F5F405F4040404040404040404040405F40400E405F40
40404040404040405F4F4F0F0F4F4F4F4F4F4F4F0F0F0F0F0F0F0F0F0F0F100F
0F0F0F0F0F4F4F0F0F0F0F0F0F0F404F4C4C32324C4C4C4C4C4C4C4032323232
3232323232103232323240324C4C32403232323232404C4D4D17171640474012
401417174017171717171717171740404017404D4D17171717171717404D1212
1212404040404052404040401212121212121212404040124040134040401240
4040124040131213131313131313131313131313131313131313131313131313
13131313131313131313403F1414141414141414141450141414141414141414
1414141414141414141414141414151414405014141414141414141414141414
1414141414141414141414141414141414141414141414144040161616161649
1616161616161616161616161616161616161616161616161616161616161640
404D4D17174D4D4D4D4D4D4D17171717171717171717171717171717174D4D17
171717171717404D4E4E18184E4E4E4E4E4E4E111820221F291B1C40271F404E
404053194E361940401F404040404E54541A1A545454545454541D1A40224040
1B1B404054405440405340544040404040404040405454541A1A545454545454
544040542240401B1B40405440544040534040361E404040404040405454541B
1B545454545454544040544040404040404054405440404040403640401B1B40
4040405454541C1C545454545454544040544040294027402754405440405340
40361E401B1B404040405455555455555555555555551D55551D1D1D1D1D1D1D
5555551D1D555555551D551D1D551D1D405556561E1E56565656565656404056
404040404040405640564040404040401E404040404040405657571F1F575757
575757571F1F1F1F1F1F1F1F1F1F1F1F571F1F401F57571F571F1F40401F4057
4040212140404040404040404040404040404040404040404040404040404040
4040404040404059592121595959595959594040214040404040404059405940
4040405940214040404040404059404023234040404040404040404040404040
4040404040404040404040364040232340404040405858232358585858585858
4040584040402323404058405840404040583623404040404040405840402525
4040404040404040404040404040404040404040404040404040404040404040
4040405A5A25255A5A5A5A5A5A5A5A255A404040404040405A405A404040265A
4026404040404040405A5A5A26265A5A5A5A5A5A5A5A265A404040404040405A
405A404040405A4040404040404040405A4C4C27274C4C4C4C4C4C4C40323332
322832273227484C32323240404C3632253232323232404C5E5E32325E5E5E5E
5E5E5E40323332323232323232485E32323240405E3632253232323232405E5E
5E40405E5E5E5E5E5E5E40404040404040404040485E5E404040405E36402540
40404040405E4C4C2B2B4C4C4C4C4C4C4C2B2D4C2B2B2B2B2B2B2B2B2B2A3232
2B2B4C4C2B2B2B322B2B2B404C2B2B2B2B2B2B2B2B2B2B2C2B2D2B2B2B2B2B2B
2B2B2B2B2B5B2B2B2B2B2B2B2B2B2B2B2B2B40402C2C2C2C2C2C2C2C2C2C2B2C
2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C40402D2D2D2D2D
2D2D2D2D2D2D2D2B2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D
40404C4C18184C4C4C4C4C4C4C40403232323232323232324C40323240324C32
2F253232403232404C4C4C30304C4C4C4C4C4C4C40323332323230303232484C
32323240404C3632403030323232404C54543030545454545454544040542240
4030304040544054404053404040404030304040404054404040404040404040
4040404040323232323232320F40323232344040403240323240323240404C4C
32324C4C4C4C4C4C4C40323332323232323232484C4C323240404C3632243232
323232404C4C4C35354C4C4C4C4C4C4C35353535353535353535354C40353535
354C3535353535353535404C4C4C40404C4C4C4C4C4C40404040404040404040
40404C40404034404C4040404040404040404C5C5C35355C5C5C5C5C5C5C3540
3535353535353535355C5C4035355C5C3535403535403535405C5D5D36365D5D
5D5D5D5D5D404040363636363636365D5D5D404036405D403640363640363640
5D60603737606060606060604040373737373737373737406040403740604037
403737403737406040403939404043444040023C3A3A3B3B3B3B3B3B3B40402A
3B3B404040363B403D3D403B3B40404E4E39394E4E4E4E4E4E4E40184E224040
1B1B40404E404E404053194E3619404040404040404E40404040404040404040
404040403B3B3B3B3B3B3B40403B3B3B404040403B403B3B403B3B40404C4C3B
3B4C4C4C4C4C4C4C403B4C3B3B3B3B3B3B3B4C4C3B3B3B40404C363B403B3B3B
3B3B404C4D4D1717164040404040141717401717171717171717174040401740
4D4D17171717171717404D4C4C39394C4C4C4C4C4C4C40403232323232323232
324C40323240324C3232323232403232404C
000016163F404142433E020F2F2F303030302530250D3E283030063E01352D22
2C2C3E30303E3D01480101010101010101010101010101010101010101010101
0101010101010101010101013E3D020202020202020202024902020202020202
020202020202020202020202020202020302023E3E0202020202020202020202
02020202020202020202020202020202020202020202020202023E3D04040404
0404040443440404040404040404040404040404040404040404040404040504
043E3E0404040404040404040404040404040404040404040404040404040404
04040404040404043E3D4A4A07074A4A4A4A0A4A080707320707070707070707
0707070709074A4A070707070707073E4A4F4F07074F4F4F4F4F4F3E07074F07
070707070707070707070707074F4F070707070707073E4F0808080808080808
08084F08080808080808080808080808080808080808080808080808083E3E4A
4A3E3E4A4A4A4A0A4A4A3E3E3E3E3E3E3E3E3E3E3E4A3E3E3E093E4A3E3E3E3E
3E3E3E3E3E4A0A0A0A0A0A0A0A0A0A0B0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A
0A0A0A0A0A0A0A0A0A0A0A3E3E0A0A0A0A0A0A0A0A0A0B0A0A0A0A0A0A0A0A0A
0A0A0A0A0A0A0A0C0A0A0A0A0A0A0A0A0A0A3E3E5D5D3E3E5D5D5D5D5D3E5D3E
3E3E3E3E3E3E3E3E3E3E3E5D3E3E0C3E5D3E3E3E3E3E3E3E3E3E5D4D4D0D0D4D
4D4D4D4D4D4D0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D4D4D0D0D0D0D0D0D0D
3E4D4A4A30304A4A4A4A4A4A4A3E3030303030303030300E303030303E304A4A
303E30303030303E4A4B4B1515143E453E103E1215153E151515151515151515
3E3E3E153E4B4B151515151515153E4B101010103E3E3E3E3E503E3E3E3E1010
1010101010103E3E3E103E3E113E3E3E103E3E3E103E3E111011111111111111
111111111111111111111111111111111111111111111111111111113E3D1212
12121212121212124E1212121212121212121212121212121212121212121212
1312123E4E121212121212121212121212121212121212121212121212121212
121212121212121212123E3E1414141414471414141414141414141414141414
14141414141414141414141414141414143E3E4B4B15154B4B4B4B4B4B4B1515
1515151515151515151515151515154B4B151515151515153E4B4C4C16164C4C
4C4C4C4C4C0F161E201D27191A3E251D3E4C3E3E51174C34173E3E1D3E3E3E3E
4C52521818525252525252521B183E203E3E19193E3E523E523E3E513E523E3E
3E3E3E3E3E3E3E5252521818525252525252523E3E52203E3E19193E3E523E52
3E3E513E3E341C3E3E3E3E3E3E3E5252521919525252525252523E3E523E3E3E
3E3E3E3E523E523E3E3E3E3E343E3E19193E3E3E3E5252521A1A525252525252
523E3E523E3E273E253E25523E523E3E513E3E341C3E19193E3E3E3E52535352
53535353535353531B53531B1B1B1B1B1B1B5353531B1B535353531B531B1B53
1B1B3E5354541C1C545454545454543E3E543E3E3E3E3E3E3E543E543E3E3E3E
3E3E1C3E3E3E3E3E3E3E5455551D1D555555555555551D1D1D1D1D1D1D1D1D1D
1D1D551D1D3E1D55551D551D1D3E3E1D3E553E3E1F1F3E3E3E3E3E3E3E3E3E3E
3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E57571F1F575757
575757573E3E1F3E3E3E3E3E3E3E573E573E3E3E3E573E1F3E3E3E3E3E3E3E57
3E3E21213E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E343E3E
21213E3E3E3E3E56562121565656565656563E3E563E3E3E21213E3E563E563E
3E3E3E5634213E3E3E3E3E3E3E563E3E23233E3E3E3E3E3E3E3E3E3E3E3E3E3E
3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E5858232358585858585858
5823583E3E3E3E3E3E3E583E583E3E3E24583E243E3E3E3E3E3E3E5858582424
585858585858585824583E3E3E3E3E3E3E583E583E3E3E3E583E3E3E3E3E3E3E
3E3E584A4A25254A4A4A4A4A4A4A3E303130302630253025464A3030303E3E4A
34302330303030303E4A5C5C30305C5C5C5C5C5C5C3E30313030303030303046
5C3030303E3E5C34302330303030303E5C5C5C3E3E5C5C5C5C5C5C5C3E3E3E3E
3E3E3E3E3E3E465C5C3E3E3E3E5C343E233E3E3E3E3E3E5C4A4A29294A4A4A4A
4A4A4A292B4A29292929292929292928303029294A4A292929302929293E4A29
2929292929292929292A292B2929292929292929292929592929292929292929
292929293E3E2A2A2A2A2A2A2A2A2A2A292A2A2A2A2A2A2A2A2A2A2A2A2A2A2A
2A2A2A2A2A2A2A2A2A2A2A3E3E2B2B2B2B2B2B2B2B2B2B2B2B292B2B2B2B2B2B
2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B3E3E4A4A16164A4A4A4A4A4A4A3E
3E3030303030303030304A3E30303E304A302D2330303E30303E4A4A4A2E2E4A
4A4A4A4A4A4A3E30313030302E2E3030464A3030303E3E4A34303E2E2E303030
3E4A52522E2E525252525252523E3E52203E3E2E2E3E3E523E523E3E513E3E3E
3E3E2E2E3E3E3E3E523E3E3E3E3E3E3E3E3E3E3E3E3E3E303030303030300D3E
303030323E3E3E303E30303E30303E3E4A4A30304A4A4A4A4A4A4A3E30313030
3030303030464A4A30303E3E4A34302230303030303E4A4A4A33334A4A4A4A4A
4A4A33333333333333333333334A3E333333334A33333333333333333E4A4A4A
3E3E4A4A4A4A4A4A3E3E3E3E3E3E3E3E3E3E3E3E4A3E3E3E323E4A3E3E3E3E3E
3E3E3E3E4A5A5A33335A5A5A5A5A5A5A333E3333333333333333335A5A3E3333
5A5A33333E33333E33333E5A5B5B34345B5B5B5B5B5B5B3E3E3E343434343434
345B5B5B3E3E343E5B3E343E34343E34343E5B5E5E35355E5E5E5E5E5E5E3E3E
3535353535353535353E5E3E3E353E5E3E353E35353E35353E5E3E3E37373E3E
41423E3E023A3838393939393939393E3E2839393E3E3E34393E3B3B3E39393E
3E4C4C37374C4C4C4C4C4C4C3E164C203E3E19193E3E4C3E4C3E3E51174C3417
3E3E3E3E3E3E3E4C3E3E3E3E3E3E3E3E3E3E3E3E3E3E393939393939393E3E39
39393E3E3E3E393E39393E39393E3E4A4A39394A4A4A4A4A4A4A3E394A393939
393939394A4A3939393E3E4A34393E39393939393E4A4B4B1515143E3E3E3E3E
1215153E1515151515151515153E3E3E153E4B4B151515151515153E4B4A4A37
374A4A4A4A4A4A4A3E3E3030303030303030304A3E30303E304A30303030303E
30303E4A
}
10 changes: 2 additions & 8 deletions runtime/lexer.reds
Original file line number Diff line number Diff line change
Expand Up @@ -1446,15 +1446,9 @@ lexer: context [
]
]

load-file: func [lex [state!] s e [byte-ptr!] flags [integer!] load? [logic!]
/local
p [byte-ptr!]
][
load-file: func [lex [state!] s e [byte-ptr!] flags [integer!] load? [logic!]][
flags: flags and not C_FLAG_CARET ;-- clears caret flag
either s/2 = #"^"" [s: s + 1][ ;-- skip "
p: s until [p: p + 1 any [p/1 = #"%" p = e]] ;-- check if any %xx
if p < e [flags: flags or C_FLAG_ESC_HEX or C_FLAG_CARET]
]
if s/2 = #"^"" [s: s + 1] ;-- skip "
lex/type: TYPE_FILE
either load? [
load-string lex s e flags yes
Expand Down
Loading

0 comments on commit cc15d58

Please sign in to comment.