|
I mean, it's not so much feeling bad, but knowing I can improve it, seeing as how i think my hand written parser is faster right now too thought it really should be *at least* as slow.
Or maybe i'm just expecting too much of it. Unlike PCK it can't stream - because it's recursive descent!, so it has to parse the entire stream into memory before you can have it.
The lag time sucks for large documents. With PCK i was never sure how "fast" it was, because it would start spitting nodes at me instantaneously - it streamed - it was a pull parser generator so it made parsers like Microsoft's XmlReader interface. When building the tree there was lag though, but it was a separate process in PCK. In Parsley it's integrated to the parse. Hard to profile each individually but not impossible.
Unfortunately, I can't generate FIRSTS(k) and FOLLOWS(k) sets for k>1 - I just don't know how and can't figure it out though i read a research paper that gave me an idea, i have yet to try it.
Then *maybe* with a table driven parser i could parse C#, but so far what i've seen of antlr, it can't do it.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
In some code that you posted, it looked like you were using exceptions a lot, maybe even for backtracking. This would be deadly, especially it backtracks a fair bit.
|
|
|
|
|
It doesn't backtrack except when it has to. And in .NET exceptions aren't the perf killer they are in C++.
I could do it without exceptions but it would double the code size as I add TryParse to everything.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Most probably I'm lost in all this parsing stuff...
Quote: it would double the code size as I add TryParse to everything It is generated code, so who cares?
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Visual studio is starting to choke on it. It wasn't giving me proper line #'s for compile errors in the generated code last night.
The source file is 1.3MB
So... I don't want it to be 2.5 or so.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
zip it
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
I can minify it. Shave a few KB at least.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Probably a naive question: Would UTF8 be counterproductive?
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
i think it already is
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
0x01AA said: What I heard/read, Microsoft worked several more days on it with several dozen programmers.
I was going to make a catty remark about too many cooks but then realized that a recursive descent parser should actually lend itself well to this kind of parallel development.
|
|
|
|
|
I really think it is predestined for team development.
Off topic: I would compare that all with this intellisense stuff, which I had occiput when writing my comment.
NB: Sorry for my English, most probably hard to get what I really try to express
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Since nobody else has, I thought I'd throw it out there.
Wishing you all success, happiness, and PHB freedom for the forthcoming year - may your bugs be trivial, your compilations clean, and your code self documented!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Happy new year for everyone from me too...
I whish you that the best of 2019 is the worst of 2020.
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.
|
|
|
|
|
Happy New Year to all!
|
|
|
|
|
Very Merry Christmas And Happy New Year 2020, You too.
|
|
|
|
|
Well, it is still a little early here across the pond, but let me wish one and all a happy, healthy and prosperous new year!
|
|
|
|
|
Happy New Year
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.
|
|
|
|
|
OriginalGriff wrote: code self documented
It's much easier to enjoy the favor of both friend and foe, and not give a damn who's who. -- Lon Milo DuQuette
|
|
|
|
|
Happy New Year to y'll as well!
Did a little mechanic work today.
Put a rear end in a recliner!
JaxCoder.com
|
|
|
|
|
Adding my $0.02:
Happy New Year y'all!!
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|
|
Yes happy new year to you all!
|
|
|
|
|
A happy new year to all.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Happy New Year to you too!
|
|
|
|
|
HNYTYA (20 chars)
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
A euphony port alleyway!
Another yuppy yellow A.A.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|