No problem, thanks for trying. I did plug it in and indeed got the same results.
On 12/2/20 6:41 PM, Jeffrey Kegler wrote: > Oops! Ignore that last! It suffers from the same problem -- longest > captures the match and all the rest of that hack-ish apparatus I talked about > would be ignored. > > I've been doing mainly LaTeX these days and obviously it is turning my brain > into mush. > > Sorry! > > On Wednesday, December 2, 2020 at 5:55:24 PM UTC-5 Jeffrey Kegler wrote: > > How many commands? One approach that I just thought of and have never > tested is to have fixed length variables, prioritized versus the commands of > that length. > > Off the top of my head: > > var2 ~ <varchar><varchar> priority=>1 > PA_command ~ 'PA' priority=>2 > PR_command ~ 'PR' priority=>2 > > include a catch-all var for lengths not specifically accounted for > > var_catch ~ <varchar>+ priority=>0 > > <var_catch> will always lose to lexemes of the same length, but will > catch those variables whose length is not the same as any command. > > A little hack-ish, but should be very fast, and perhaps no more hack-ish > than alternatives. > > Again, not tested, so you'll be a pioneer! If you try it, let me know! > > Hope this helps, jeffrey > -- You received this message because you are subscribed to the Google Groups "marpa parser" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/marpa-parser/e41356d7-0c97-b7b4-6587-c3ab63a99b82%40gmail.com.
