Click here to Skip to main content
15,910,123 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

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.

 
GeneralRe: Alternate Song of the weekend ;) I you, I'll kill you. Pin
User 1106097915-Feb-20 5:46
User 1106097915-Feb-20 5:46 
GeneralRe: Alternate Song of the weekend ;) I you, I'll kill you. Pin
Mike Hankey15-Feb-20 6:12
mveMike Hankey15-Feb-20 6:12 
GeneralRe: Alternate Song of the weekend ;) I you, I'll kill you. Pin
Mark_Wallace15-Feb-20 6:42
Mark_Wallace15-Feb-20 6:42 
GeneralRe: Alternate Song of the weekend ;) I you, I'll kill you. Pin
Sander Rossel17-Feb-20 5:26
professionalSander Rossel17-Feb-20 5:26 
GeneralRe: Alternate Song of the weekend ;) I you, I'll kill you. Pin
Mike Hankey17-Feb-20 5:40
mveMike Hankey17-Feb-20 5:40 
GeneralRe: Alternate Song of the weekend ;) I you, I'll kill you. Pin
Sander Rossel17-Feb-20 5:45
professionalSander Rossel17-Feb-20 5:45 
GeneralRe: Song of the weekend ;) I hate him, I love him. He is/was such an a* whatever ***Not KSS*** Pin
Sander Rossel17-Feb-20 5:37
professionalSander Rossel17-Feb-20 5:37 
RantEpsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 4:03
mvahoney the codewitch15-Feb-20 4:03 
I'm on my way to being able to create parser generators that can parse natural language

I'm using GLR parsing which is a form of LR parsing that uses a non-deterministic approach to running one of the existing LR algorithms (usually LALR(1))

Basically the GLR algorithm uses almost exactly the same tables as the LALR(1) algorithm but it uses with with 1+n stacks instead of 1 stack where n is the number of alternate parses it is finding in the input (GLR can return multiple parse trees for the same input)

Now this is cool. However, my LALR(1) algorithm is clearly broken.

I taught myself how to do it using what I could find on the web, and 90% of it works. The 10% are the blasted epsilon rules. The issue is when I was "taught" LALR(1) by the web it only showed me monotonic grammars - no epsilon rules. Now, any grammar can be converted to monotonic, and it's the approach Chomsky suggests so a lot of eggheads do it that way, and then work on the monotonic form. It's not as practical when making a parser generator though because it significantly changes what the resulting parse tree looks like.

Most (all?) real world algorithms can handle epsilons but since I was only shown how to do this by some undergrads with free time and such I have never learned this.

LALR(1) is very difficult to understand. I understand most of it now, but do i understand enough to modify the algorithm to do what I need?

I hope so. I've been smashing away at it all morning, getting close, but never quite there.
Real programmers use butterflies

GeneralRe: Epsilon, foul epsilon, how you vex me Pin
User 1106097915-Feb-20 4:28
User 1106097915-Feb-20 4:28 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 4:58
mvahoney the codewitch15-Feb-20 4:58 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
Mark_Wallace15-Feb-20 6:45
Mark_Wallace15-Feb-20 6:45 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
kalberts15-Feb-20 7:32
kalberts15-Feb-20 7:32 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
Mark_Wallace15-Feb-20 20:18
Mark_Wallace15-Feb-20 20:18 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 9:05
mvahoney the codewitch15-Feb-20 9:05 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
Member 1298255815-Feb-20 7:52
Member 1298255815-Feb-20 7:52 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 9:06
mvahoney the codewitch15-Feb-20 9:06 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 9:11
mvahoney the codewitch15-Feb-20 9:11 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
Ravi Bhavnani15-Feb-20 12:59
professionalRavi Bhavnani15-Feb-20 12:59 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 13:23
mvahoney the codewitch15-Feb-20 13:23 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
Greg Utas15-Feb-20 14:01
professionalGreg Utas15-Feb-20 14:01 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 14:38
mvahoney the codewitch15-Feb-20 14:38 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
Greg Utas15-Feb-20 15:14
professionalGreg Utas15-Feb-20 15:14 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 16:01
mvahoney the codewitch15-Feb-20 16:01 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
Greg Utas15-Feb-20 16:31
professionalGreg Utas15-Feb-20 16:31 
GeneralRe: Epsilon, foul epsilon, how you vex me Pin
honey the codewitch15-Feb-20 16:37
mvahoney the codewitch15-Feb-20 16:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.