|
Thank you for the kind words - they keep me going some weeks.
TTFN - Kent
|
|
|
|
|
Thank you making us laugh for every news item.
If you are not criticized, you may not be doing much.
|
|
|
|
|
Successfully broke Microsoft Ajax Minifier and YUI Compressor using ECMAScript (JS) 2015 (6) syntax for ComputedPropertyName in object creation...
See you next year...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
It's just like a rodeo, but instead of breaking a horse you are breaking the Minifier.
Maybe we should refer to you as "Bronco Peter" in the new year.
Yeehaaaah
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: Microsoft Ajax Minifier and YUI Compressor using ECMAScript (JS) 2015 (6) syntax for ComputedPropertyName in object creation.
this line here made my brain explode all over my monitor.
It's much easier to enjoy the favor of both friend and foe, and not give a damn who's who. -- Lon Milo DuQuette
|
|
|
|
|
So I ran into the Dangling else[^] problem but I thought I could solve it using an open ended where constraint in my grammar, possibly enabling backtracking i wouldn't need who cares.
Anyway, turns out nobody usually tries to parse languages with LL based parser generators in part because of problems like this.
So there's no easy doc on how to adjust an LL parser to fix the problem, and my parser seems to be hanging up on it - by choosing the wrong one (either that or there's a bug somewhere else in my grammar), i haven't fully pinpointed it yet.
I don't know what to do. I can solve it using a virtual production (where I take over the parse) but i only want to use those as a last resort
I think I figured it out. There was a bug in my grammar that wasn't helping.
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.
modified 31-Dec-19 4:16am.
|
|
|
|
|
Fascinating. I always use curly braces so there's no ambiguity, so I tried:
class Program
{
public static string DanglingElse(bool a, bool b, string atrue, string btrue)
{
if (a) if (b) return btrue; else return atrue;
return "X";
}
static void Main(string[] args)
{
Console.WriteLine("false, false: " + DanglingElse(false, false, "A", "B"));
Console.WriteLine("false, true: " + DanglingElse(false, true, "A", "B"));
Console.WriteLine("true, false: " + DanglingElse(true, false, "A", "B"));
Console.WriteLine("true, true: " + DanglingElse(true, true, "A", "B"));
}
}
Resulting in:
false, false: X
false, true: X
true, false: A
true, true: B
So in C#, the else applies to the inner "if".
|
|
|
|
|
Yep. Basically all C family languages do. It's part of the spec. Getting the parser to do it though?
With an LR parser all you do is override a shift reduce conflict.
With LL it's a bit more difficult. I ended up writing the parse for it by hand. I'm sure I didn't have to, but i didn't want to spend the extra time figuring out the )%)@$$ grammar constructs i could get it to actually eat
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.
|
|
|
|
|
I actually can't think of any language that doesn't.
Python doesn't count.
|
|
|
|
|
Visual basic effectively disallows it because of the end if syntax (i think. i don't touch VB)
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.
|
|
|
|
|
Which is correct according to the documentation.
|
|
|
|
|
So now with Parsley parsers can call other parsers. You can import several grammars and delegate different parts of parse to them, like a compositional/composing parser would.
But unlike a compositional setup, it doesn't force you to use it, meaning that rather than forcing you to define your entire grammar like legos, you can just factor where you need to.
For example, I have slang's parsing broken up into expressions, statements, members/typedecls, and namespace/compile units.
This is awesome. For starters it allows you to use it such that you can parse individual statements and expressions as well as whole compile inits.
Second, and perhaps most importantly, this allows you to break your parse up into several different "parse tables"
This means that rules from expressions will not interfere or conflict with rules from statements, nor members and such.
This is super important for LL(1) parsing where it's easy to run into conflicts as soon as things get at all non-trivial.
I'm excited about this. I'm not sure if it's a totally new idea or not but I've never seen a parser generator that could do this.
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.
|
|
|
|
|
Another article methinks for us mere mortals
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
I'm a bit of a ways from that. bugs and such
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.
|
|
|
|
|
OK, I just really want to understand the reason you write this sort of code ( my lack of comprehension kicks in here )
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
I wrote this to parse slang because my hand written parser was too buggy and took too much work to maintain.
It's obviously not limited to that, but there it 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.
|
|
|
|
|
Are you doing all of this for a job?
Or do you have a research grant?
Or is this what you're doing for a hobby, and your day job is even more complicated?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Upvoted as Question of the Month.
I think we can rule out (a) because I wonder if there's an outfit on the face of the planet that would fund something like this. It could be skunkworks on the part of an enlightened lower-level manager, hidden from overseers. But then it would also be unlikely to be yapped about on this site, for various reasons.
I think we can rule out (b) because few people in an academic setting do useful things at this scale. It looks like a serious effort, not some toy experiment.
I think the answer is (c), part one. There isn't time for this and a day job short of taking lots of backlogged vacation.
|
|
|
|
|
This is what i do because I am too mad to work in software anymore.
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.
|
|
|
|
|
Surely there's a great backstory to this, so please vent about your experiences working in software. You don't have to name names when describing idiocy. Please note the "Rant" button that the site designers so thoughtfully provided.
I thought this[^] was a really good post, so I added a couple of things to it. It sounds like you could too.
|
|
|
|
|
There's not much to tell. I went crazy in 2016. Schizoaffective.
That's not really an easy one to live with. My executive functioning is shot, I'm paranoid of other people, and agoraphobic as a result.
Consequently, I can't work much at all anymore - though i do some - much less in software, but I've been coding since i was 8, so i still do it, despite my short term memory issues which can make it challenging.
That's a long way of saying i'm a mental case shutin who knows C++ and C#.
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.
|
|
|
|
|
Wow, that's not what I was expecting. It's great that you can joke about it. I hope you recover, but it seems like you'll produce things of greater value while not working in software.
|
|
|
|
|
Yeah probably. Otherwise i'd get stuck doing bizdev for some website backend
There is no cure for my condition, but I have a very supportive and patient spouse, so i'm fortunate in that.
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.
|
|
|
|
|
I just do it for love.
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.
|
|
|
|
|
: Continues to bang head against some bad HTML... :
|
|
|
|