From 059fc69b2c7853b937ddb4cfc9d36304dee07893 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 1 Apr 2023 10:50:35 +0200 Subject: 2023-04-01 09:31:00 --- tex/context/modules/mkiv/x-asciimath.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'tex/context/modules/mkiv/x-asciimath.lua') diff --git a/tex/context/modules/mkiv/x-asciimath.lua b/tex/context/modules/mkiv/x-asciimath.lua index fdcab141c..f158065aa 100644 --- a/tex/context/modules/mkiv/x-asciimath.lua +++ b/tex/context/modules/mkiv/x-asciimath.lua @@ -6,15 +6,14 @@ if not modules then modules = { } end modules ['x-asciimath'] = { license = "see context related readme files" } ---[[ldx-- -

Some backgrounds are discussed in x-asciimath.mkiv. This is a third version. I first -tried a to make a proper expression parser but it's not that easy. First we have to avoid left -recursion, which is not that trivial (maybe a future version of lpeg will provide that), and -second there is not really a syntax but a mix of expressions and sequences with some fuzzy logic -applied. Most problematic are fractions and we also need to handle incomplete expressions. So, -instead we (sort of) tokenize the string and then do some passes over the result. Yes, it's real -ugly and unsatisfying code mess down here. Don't take this as an example.

---ldx]]-- +-- Some backgrounds are discussed in 'x-asciimath.mkiv'. This is a third version. I +-- first tried a to make a proper expression parser but it's not that easy. First we +-- have to avoid left recursion, which is not that trivial (maybe a future version +-- of lpeg will provide that), and second there is not really a syntax but a mix of +-- expressions and sequences with some fuzzy logic applied. Most problematic are +-- fractions and we also need to handle incomplete expressions. So, instead we (sort +-- of) tokenize the string and then do some passes over the result. Yes, it's real +-- ugly and unsatisfying code mess down here. Don't take this as an example. -- todo: spaces around all elements in cleanup? -- todo: filter from files listed in tuc file -- cgit v1.2.3