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.
I was asleep and dreaming once, where in my dream I was listening to another person who told a joke. I had never heard that joke before and the joke was funny. Somehow in my dream state, I realized that I was dreaming and realized the profoundness of the situation. I woke up and have pondered this many times since.
And now the output is in a nice, single file, with the primary output implementing IEnumerable<Token>/IEnumerator<Token>
I still have to update the command line argument parsing and a bit of the grammar spec but at least I'll have a deliverable for Codeproject very early this next month
Accomplishing this was so much harder than it looks. I'm using some really grotty code someone else wrote and hasn't maintained for 6 years and I had to retool the front end and back end of it both.
I still barely understand it, but apparently well enough to get it to tease out a lexer that looks how I want it.
The hard part was adjusting the input file format. The original parser is heavily embedded with the app's logic. I had to reverse engineer it, and it's not a hand written parser. It's not even top down so it's impossible to follow in a debugger. It's a table driven LALR(1) parser with syntax directed actions. Fun. =(
I finally went back to the original .y file to get at the parser logic. Of course to change it I had to find an old copy of gppg.exe on the web somewhere (behind a "dangerous" link so I had to wget it - my browser refused to download) - that's so I could get GPLEX to rebuild its parser code.
Anyway, I can see daylight now. I just have to change a few more things with the input spec and then change up the command line argument processing some more.
I'm probably the only person that will ever use this.
Parsing ambiguity: is "F*** off" an instruction, or a name?
ask the witch above :P
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.