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.
The fun thing about problems like this is to figure out what makes it easy for you. We are really good at categorizing / grouping recursively without thinking, and computers have to be programmed to do this stuff.
So, why is this easy for the brain to figure out? How do you capture that ease in an algorithm?
I've given up on LALR parsing for now because my tables are off - for some grammars - and i can't figure out why.
So instead what I'm doing is improving my LL(1) parser with automatic grammar refactoring so you can use grammars that are not intrinsically LL(1) - LL(1) being very limiting in terms of expressive power.
And this is part of the process. The full process is explained here at the link below, fortunately I got accustomed to understanding heavy Indian accents and Indian-English vernacular while at Microsoft. =)
... who posts those dumb questions. I was watching the film "Jason Bourne" last night (yes, I know). At the beginning was the usual scene, a darkened room with a few people controlling the world from their laptops. As their fingers were playing over the keys I heard someone say "Use SQL to corrupt their database(s)".
Having performed my time writing SQL, yes I can see that. The best way to do this is to have inexperienced people try to "improve" the SQL code for you... that will irreparably booger up a database faster then you can say STOP! NO DON'T!