|
Good luck in your endeavor. I hope you don't have to interpret that language!
Real programmers use butterflies
|
|
|
|
|
Thanks again. I'm going to use the grammar to drive an infragistics syntax highlighting control. And to parse it so that I can format it from minified into readable form.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Forgive me, but a grammar isn't the best way to approach that.
Syntax highlighting is usually done these days in pro systems using a combination of regular expressions and anchors.
Minification is done even more easily, simply by tossing out whitespace around most tokens and skipping strings. You barely need to lex.
A grammar is going to make it slow, hard to debug, and a lot harder to code. Just my $0.02. Been to this rodeo a few times.
Real programmers use butterflies
|
|
|
|
|
I do appreciate the advice.
What is your recommendation, given that lexing and parsing are beyond me right now. I don't know enough about either one.
But I have this Infragistics control and it uses EBNF files to highlight and parse. Right now it looks like my best option.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Well if you already have a control that uses EBNF grammars, go ahead and use that, I suppose.
Except i doubt it will handle comments properly for reasons. You'll want to check. particularly with /* */ in the middle of wo/*like this*/rds
I'd have probably used ICSharpCode.AvalonEdit if i was starting from scratch but that would just be a starting point for me.
Your minification shouldn't use it at all i think though.
What you'll want to do is make code that skips javascript strings and comments.
And then from there you'll want to take what's left over and reduce all whitespace runs to a single space. If you want to get more minified than that you can eliminate all space except when two identifiers are next to each other.
Real programmers use butterflies
|
|
|
|
|
Wow. It sounds like you like your pain in large doses. Do you golf as well?
Software Zen: delete this;
|
|
|
|
|
I like imagining that I'm doing worthwhile stuff. Whether I really am, is anybody's guess.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
Thank you very much volunteers to let that through, most probably Paul or Richard or Nelek
modified 27-Sep-21 21:01pm.
|
|
|
|
|
You are welcome
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.
|
|
|
|
|
|
Not gonna lie, Pavarotti made Bono look sound like a contestant at a small town karaoke night.
Not that he was awful - but they're just not in the same class.
|
|
|
|
|
I suspect a hummuscide.
Yes, yes, I'm showing myself out again, didn't even take off my coat.
|
|
|
|
|
I'm falafel grateful for your post
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
Please don't tahini more of those ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
The chick pea’s cousin, baby Ghanoush, will not even have a memory of their relative.
|
|
|
|
|
It might be an acquired taste: Humus[^]
|
|
|
|
|
|
|
I'm trying to stop being one of those inactive developers. My doctor says that walking 30 minutes a day can make a big difference.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Small kids are better than a gym
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.
|
|
|
|
|
I live about six km from my office (I hand-picked it myself though) and I make it a thing that I cycle to the office every day.
Even when I have an appointment in the morning or afternoon, I take the car to my appointment, drive back home, and take the bike from there.
I even bought a fairly expensive rain coat so I can take my bike even when it rains (I used to have a plastic one, but that means you'll be dripping from sweat instead of rain).
It helps me greatly that cycling to work also fills a practical task, getting to the office
|
|
|
|
|
You don't need to worry about stroke or heart disease, but what about motorized vehicles?
My wife is a nurse in a same day surgery unit. They get bicycle riders with broken bones every day.
Please be careful!
ed
|
|
|
|
|
I'm from the Netherlands, we have more bikes than people and more people than cars and lots of bicycle lanes.
In biking Netherlands, bicycle hits you
|
|
|
|
|
Sander Rossel wrote: In biking Netherlands, bicycle hits you But since they are never going downhill it doesn't hurt.
|
|
|
|