From 4b33ab4a5654f7acaeb0aff6ba5c078e3f6bcd73 Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Fri, 14 Jun 2024 10:17:19 +0200 Subject: [PATCH] added support for loading dictionary structure --- docs/schema.typ | 5 ++- gallery/test.pdf | Bin 43243 -> 48944 bytes gallery/test.typ | 102 +++++++++++++++++++++++++++++++++++++++++++++++ manual.pdf | Bin 117930 -> 117998 bytes src/schema.typ | 2 + 5 files changed, 107 insertions(+), 2 deletions(-) diff --git a/docs/schema.typ b/docs/schema.typ index c915cd8..fe19f95 100644 --- a/docs/schema.typ +++ b/docs/schema.typ @@ -2,8 +2,9 @@ /// This function returns a dictionary of structures /// /// Supported formats: #schema.valid-extensions.map(e => raw("." + e)).join(", ") -/// - path-or-schema (str, raw): If it is a string, defines the path to load. \ -/// If it is a raw block, its content is directly parsed (the block's language will define the format to use) +/// - path-or-schema (str, raw, dictionary): If it is a string, defines the path to load. \ +/// If it is a raw block, its content is directly parsed (the block's language will define the format to use) \ +/// If it is a dictionary, it directly defines the schema structure /// -> dictionary #let load(path-or-schema) = {} diff --git a/gallery/test.pdf b/gallery/test.pdf index 1c90a5a86aa5b0c4fd0cc32cc25516ac6a7103cd..7a43849d629399024e19c4b4876efc7afadeff8b 100644 GIT binary patch delta 14314 zcmeHuXHZm4x2^*cBnSwC2ofZUgqa}>AOk1}qDWAbC?GI`l5-q32C~E(IBWH6+US|CM}I2CuJ*^B*dM@%tFs%mUT#q`ABPcAtGTk2n-ucfmZat zFwPqU@e{(ULwR?efZ14B0`1* z0)|bCk$K2P0Ec3pJhY;g_^HkYK0*pGHkb%z@}WFLqWFsDD?$v!mi9z#&6fouVoMJZ z!7L-VF_&~D0L%c2k>r%Fz}jPkjE>9j9bkWlb!ZONbrh*Qjyf7ZZ_ivfTJHz&Nzr>{ z9n}Y7$EG`j3#0qdwFiCagB=pbe3N^?;m&gOa;;>UmW~0&|0>gD+3ql|C%&u}kDf6& z!hhSJ-W&xSWRB-P3?^Me??qd*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O^p3~sOvh5{^Y=+!ru+~xBG-&q)OXJV#0`9l;y_&d)m0|`>+ z)ZE{BrsAI0j$hWX(w?wYF^sPhyYs#_Rxle+(X0}dVBNoL&}<2guWTnd*k(jpFtsO_@&ue)k_8ioow<3e5 zPyLm)BsU-m`ZpW%&6Orv}Ro4?m}?j-y?dcCuwZ zOjZY21P3an1_n-EQ>ATe9ly#u-`inoFjQtn?%|%d&>r>5T=-l&*nobGEzwY%?RF;H zz*NjWiOnx{9Q%~8axfbh{gwRK+qEz{CP79 z4-d)*KSYQL@o1apDtfSatm;V8Cr@m>-Lw^5Y&0!A)uGOh9ZmUo zP2q2vQApQmkytqaaymEzAtA{2CH?E}wAUwk0Ev~DF&i*>y&le~!1Pb2N z`l}2oC;(mv`>RYyi0>bKp}f3&zu58e2?+E4A_GT*=gJOFRL2B>x3vBO%)`Sk_-kW4 zJVHFbg783j1i;&0fANJt!D0RfnSju*or3W4@bdp|2mJk?LwKS82*?K&{?!=@<>CLe zVJH*=`G-*h@qXI;{A0L_;>_(e{F;h0ulVRGkg%J@IUxMc?J04 z>Gd@3f>$e1&B4Ky?rKiK3w>Z!!Ty;89Tdd*qbftE$NEnfl!v%D8{NNF{fq$@S7T>a VPiOOIc;Le4=f}HyS5{f>zX06QSkeFh diff --git a/gallery/test.typ b/gallery/test.typ index c8005f2..8b97dab 100644 --- a/gallery/test.typ +++ b/gallery/test.typ @@ -25,4 +25,106 @@ structures: ```) #schema.render(test-raw, config: config.config( full-page: true +)) + +#let test-typ = schema.load(( + structures: ( + main: ( + bits: 32, + ranges: ( + "31-28": (name: "cond"), + "27": (name: "0"), + "26": (name: "1"), + "25": (name: "I"), + "24": ( + name: "P", + description: "pre / post indexing bit", + values: ( + "0": "post, add offset after transfer", + "1": "pre, add offset before transfer" + ) + ), + "23": ( + name: "U", + description: "up / down bit", + values: ( + "0": "down, subtract offset from base", + "1": "up, addition offset to base" + ) + ), + "22": ( + name: "B", + description: "byte / word bit", + values: ( + "0": "transfer word quantity", + "1": "transfer byte quantity" + ) + ), + "21": ( + name: "W", + description: "write-back bit", + values: ( + "0": "no write-back", + "1": "write address into base" + ) + ), + "20": ( + name: "L", + description: "load / store bit", + values: ( + "0": "store to memory", + "1": "load from memory" + ) + ), + "19-16": ( + name: "Rn", + description: "base register" + ), + "15-12": ( + name: "Rd", + description: "source / destination register" + ), + "11-0": ( + name: "offset", + depends-on: "25", + values: ( + "0": ( + description: "offset is an immediate value", + structure: "immediateOffset" + ), + "1": ( + description: "offset is a register", + structure: "registerOffset" + ) + ) + ) + ) + ), + immediateOffset: ( + bits: 12, + ranges: ( + "11-0": ( + name: "12-bit immediate offset", + description: "unsigned number" + ) + ) + ), + registerOffset: ( + bits: 12, + ranges: ( + "11-4": ( + name: "shift", + description: "shift applied to Rm" + ), + "3-0": ( + name: "Rm", + description: "offset register" + ) + ) + ) + ) +)) + +#schema.render(test-typ, config: config.config( + full-page: true )) \ No newline at end of file diff --git a/manual.pdf b/manual.pdf index b9945acc9c3193610078c5eb995358427e4c2e84..8de11c3d24a51311764a7201a3b3b2b6fdb8eae9 100644 GIT binary patch delta 4347 zcmZ`+c|25WA2+&L21Q*VOXPAbHO`qiXXcExgd~zBBC;jf8+(O82+?Aj>=aVAGInLn z60$GXRuQsXlCrDb=`OwRow@J%%pd1`pXc{{f4}eV`#hg{9w)FaCa?w+qxS7$fruam zi!T%2h58&SfW>3*cnAxNVhJ=9h9OZLNW?%`h(bDuGNLTSptLC+aVT~nJd7bAI07Py z!vYut2NMaRSQx>;5DtbZALCH*J76qGk-LEUg}iX?oaP|Go;*hY$!F}k- zxi=F!Ny8r{hCB~=jmi7{cBsq8V)Mfmmju@%_sj?GHwRCo)JAKDH;BD|*M2$lxDoTW zH3>{zi@ch&ljj=AYf0Bm#dmYIrhlwK+i`E8P7zZVY)-a6>Sm zqfdq$W+}VZ@z>dI|o>tka+_e2DyaCX_haM|-ttC3s?aFlIcFE>PC8$T8jrK&la zb!c%liEK!*qdsUGA`gq$PN@qg?-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!5F9%OlLOokzt4MQM^Kw`&mc+Spr7{@(m) ziT{x%adgZ&M<8+DN5XMPL?RO*l>I_72(otvk|6?{4nFcI_aDNc?f|$2k&-eXJ0K;5Z1vAi{AU472YJ2!&uAXU8ysW1&DWk;Lv` z2qq!yo`GNlX7>kcbK^Kj;~<1}-}XP||Ko9ja5xV4LwFn+N3(tc90LD!r3dWUqpGm; VUqiH>CxDay>v0rRQ86$x{0|9YPb&Zb diff --git a/src/schema.typ b/src/schema.typ index a34efdc..15794d2 100644 --- a/src/schema.typ +++ b/src/schema.typ @@ -44,6 +44,8 @@ #let load(path-or-schema) = { let schema = if type(path-or-schema) == str { parse-file(path-or-schema) + } else if type(path-or-schema) == dictionary { + path-or-schema } else { parse-raw(path-or-schema) }