The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
I was hoping to push out my unicode version of Rolex, but problem after problem and 3 implementations later I'm still in the weeds, but at least it's spitting *something* back at me finally. That's not much of a milestone, but the way things have been going i'll take it.
I had to hijack the parse process and gut it, using bits and pieces of what was left over in an awful hack I'll lose sleep over.
I barely know what this does, and I just wrote it. Unfortunately there's no intelligible way to do this short of somehow entirely rewriting the Gplex parser internals which I'm not here for.
aast.visibility = "internal";
useUnicode = true;
int cardinality = (!useUnicode ? asciiCardinality : unicodeCardinality);
if (targetSymCardinality == notSet || targetSymCardinality == cardinality)
targetSymCardinality = cardinality;
charClasses = true;
compressMap = true;
//parser.Parse();var lc = LexContext.Create(input);
var rules = _ParseRules(aast, sbuf, lc);
// add an error rulevar str = ".return -1;";
var buf = new StringBuffer(str);
LexSpan ls = new LexSpan(1, 0, 1, 0, 0, 1, buf);
LexSpan las = new LexSpan(1, 1, 1, str.Length, 1, str.Length, buf);
RuleDesc desc = new RuleDesc(ls, las, new List<StartState>(), false);
desc.useCount = 1;
Aaaand now for some reason certain regexs aren't matching. I'm done. This is just messed up.
I'm buying a book and finishing my own code this is ridiculous.
Honestly, I'd be more worried about it if the code I was borrowing would survive code review as it is (it wouldn't)
What's funniest about it is that they use all these really terrible names for things, and then they bother to put SuppressMessageAttribute declarations everywhere to shut up Code Analysis that whines about all the terrible things they're doing.
I mean, they're aware enough to realize it's terrible, but they refuse to fix it. =)
I just don't know with this code. Not my circus, not my monkeys.
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun