|
|
super has it right for Lost Empire.
|
|
|
|
|
|
Pretty good -- and very accurate, making it especially useful for ESL people.
I never thought I'd see the day when I'd bookmark a twitter page...!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
So this is the kind of code I have to completely remake.
This is part of convoluted parser that's not even recursive descent, so it's next to impossible to debug. It's generated and table driven, calling helper methods like this ugly thing below:
internal static RuleDesc MkDummyRuleDesc( LexCategory cat, AAST aast ) {
RuleDesc result = new RuleDesc();
result.pSpan = null;
result.aSpan = aast.AtStart;
result.isBarAction = false;
result.isPredDummyRule = true;
result.pattern = String.Format( CultureInfo.InvariantCulture, "{{{0}}}", cat.Name );
result.list = new List<StartState>();
result.ParseRE( aast );
result.list.Add( aast.StartStateValue( cat.PredDummyName ) );
return result;
}
I've included all the comments.
I have no idea what this does, or why dummy rules would have to be made in the first place. I'm not even clear on what a rule is, although I have a vague idea.
This code has no documentation. At best, it's mostly a reimplementation of lex in C#, so I kind of know what inputs it accepts from the lex man pages. It has flex extensions too though but not all of them. Who knows what it supports? I'm not even sure the original author does and the primary engine hasn't been updated in 6 years.
Even if i get this working how I want it will probably always be C# only unless i want to debug slang enough to get it to work with it or retool all of the code generation to use the codedom by hand. Ugh.
And that's not even the worst bit.
I have half a mind to leave the parser in place, preparse my desired document format, and then write out a document to this parser spec format in memory and then feed it to it that way, but what a nasty mess!
Real programmers use butterflies
|
|
|
|
|
That's why I wrote a parser and lexer from scratch. Sure, code generation helps, but it just shifts the problem to one of getting the grammar right and fixing it for unusual cases. Ever looked at the C++ quasi-grammar sprinkled throughout cppreference.com[^]? I'd hardly know where to begin with such shite. Of course, it's not the fault of that site, which I consult frequently. It's probably inevitable when a language continually evolves while being reluctant to deprecate anything.
|
|
|
|
|
I mean, my previous version of Rolex used my own hand rolled parser, but this version is using the Gplex engine and I want to keep the regex syntax the same as Gplex - that and it's near impossible to build up the regex trees for gplex on my own - the trees are so convoluted that i'm basically stuck using the parser they gave me.
I found that the regex parsing part - that subset, is handrolled recursive descent so that helps at least, but it's still ugly.
Real programmers use butterflies
|
|
|
|
|
Have you considered using Vaughan Pratt’s top-down operator precedence parsing?
|
|
|
|
|
I'm lexing, not parsing. The key here is speed, and that means stackless DFA.
Top down is easy, I've already built a zillion top down parsers including Parsley: A Recursive Descent Parser Generator in C#[^]
But I'm just looking for an efficient DFA lexer engine that handles unicode. GPLEX does it but the output is ugly and multi-file, and the input doc is fugly and looks like a lex spec, so I'm gutting gplex and changing the input and outputs but keeping the engine, if that makes sense.
Right now I've got the output where i like it but I'm working on changing the input spec.
Real programmers use butterflies
|
|
|
|
|
Why do you think a stackless DFA is faster?
|
|
|
|
|
simple. less work to do
Real programmers use butterflies
|
|
|
|
|
I clicked the link for a codepen.io and it had a splash screen for a few seconds that read,
"Why did the programmer quit her job.
Because she did not get arrays."
Corny, but made me smile to have humor in an unexpected place.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
or because she was in this->array ?
I'd rather be phishing!
|
|
|
|
|
You are "supposed" to just post the joke as if it were your own, without the back story.
and then you are "supposed" to write something to the effect "getting my coat now".
It's much easier to enjoy the favor of both friend and foe, and not give a damn who's who. -- Lon Milo DuQuette
|
|
|
|
|
I never have fit in with the crowd very well.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
The guys are just pulling your leg.
|
|
|
|
|
And don't forget the "OTD"
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
No, they haven't.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Cheese: should you handle it more Caerphilly?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Depending on which cheese, more sensibly, for sure. Some will even detonate on contact.
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
aw cut that out .... no not the cheese! don't cut the cheese!
after many otherwise intelligent sounding suggestions that achieved nothing the nice folks at Technet said the only solution was to low level format my hard disk then reinstall my signature. Sadly, this still didn't fix the issue!
|
|
|
|
|
Is a lithe Belgian ballet dancer known as a Limburger?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
So how well do you know that cheese?
It goes ridiculously well on pizza, if you take the maggots out.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
The maggots are the protein. If they're still alive, then its like Sashimi pizza.
|
|
|
|
|
When it comes to handling cheese, just brie careful, cut some slices and then Edam.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|