Click here to Skip to main content
15,907,910 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: Mini CCCs 160 - Done Pin
Tim Deveaux2-Jan-20 19:56
Tim Deveaux2-Jan-20 19:56 
Generalwe need to harness this talent for CodeProject ! Pin
BillWoodruff2-Jan-20 17:01
professionalBillWoodruff2-Jan-20 17:01 
GeneralRe: we need to harness this talent for CodeProject ! Pin
PIEBALDconsult2-Jan-20 18:20
mvePIEBALDconsult2-Jan-20 18:20 
GeneralRe: we need to harness this talent for CodeProject ! Pin
BillWoodruff3-Jan-20 1:12
professionalBillWoodruff3-Jan-20 1:12 
GeneralRe: we need to harness this talent for CodeProject ! Pin
Mark_Wallace2-Jan-20 23:50
Mark_Wallace2-Jan-20 23:50 
GeneralMy observations on parser generators Pin
honey the codewitch2-Jan-20 14:07
mvahoney the codewitch2-Jan-20 14:07 
GeneralRe: My observations on parser generators Pin
Greg Utas2-Jan-20 15:04
professionalGreg Utas2-Jan-20 15:04 
GeneralRe: My observations on parser generators Pin
honey the codewitch2-Jan-20 15:10
mvahoney the codewitch2-Jan-20 15:10 
I'm glad you read this post. I was thinking of you when I wrote it. I enjoy our conversations, as we have similar passions, it seems.

My "Macros" are actually type checked. After the code gets parsed and dumped into an AST then I go back and resolve macros and I do it in a type safe manner. They resolve to function calls. It isn't a simple preprocessor, so doesn't have a lot of those traditional drawbacks.

Sure, templates are "macros on steroids" but more importantly perhaps, they're *type checked* "macros".

I love templates in C++. Once you learn Generic Programming(TM) you never go back unless you have to.

By the way, you might want to consider using a lexer like flex or lex for your parser.

The reason is speed, not just ease.

If you learn how to use it (the learning curve isn't big, lex is stupid simple and mostly you write it in C/C++ code) - it will do things like shortest string discovery. It uses these optimizations to skip examining characters in the input stream, speeding up the parse. This is near impossible in a hand built lexer, because you need a lot of tabular data to do it properly.

It also makes your parser less buggy than hand lexing, in my experience. Evaluating tokens is a hell of a lot less error prone than evaluating individual characters, although I'm only assuming you're doing scannerless/lexerless parsing.
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.

GeneralRe: My observations on parser generators Pin
Greg Utas2-Jan-20 15:59
professionalGreg Utas2-Jan-20 15:59 
GeneralRe: My observations on parser generators Pin
honey the codewitch2-Jan-20 16:13
mvahoney the codewitch2-Jan-20 16:13 
GeneralRe: My observations on parser generators Pin
honey the codewitch2-Jan-20 15:54
mvahoney the codewitch2-Jan-20 15:54 
GeneralRe: My observations on parser generators Pin
Mark_Wallace2-Jan-20 23:55
Mark_Wallace2-Jan-20 23:55 
GeneralVisual Studio and WINE? Pin
honey the codewitch2-Jan-20 12:00
mvahoney the codewitch2-Jan-20 12:00 
GeneralRe: Visual Studio and WINE? Pin
Kornfeld Eliyahu Peter2-Jan-20 12:07
professionalKornfeld Eliyahu Peter2-Jan-20 12:07 
GeneralRe: Visual Studio and WINE? Pin
Eddy Vluggen2-Jan-20 12:55
professionalEddy Vluggen2-Jan-20 12:55 
GeneralRe: Visual Studio and WINE? Pin
honey the codewitch2-Jan-20 12:59
mvahoney the codewitch2-Jan-20 12:59 
GeneralRe: Visual Studio and WINE? Pin
Eddy Vluggen2-Jan-20 13:38
professionalEddy Vluggen2-Jan-20 13:38 
GeneralRe: Visual Studio and WINE? Pin
theoldfool2-Jan-20 13:51
professionaltheoldfool2-Jan-20 13:51 
GeneralRe: Visual Studio and WINE? Pin
honey the codewitch2-Jan-20 13:56
mvahoney the codewitch2-Jan-20 13:56 
GeneralRe: Visual Studio and WINE? Pin
Eddy Vluggen3-Jan-20 2:40
professionalEddy Vluggen3-Jan-20 2:40 
GeneralRe: Visual Studio and WINE? Pin
honey the codewitch3-Jan-20 4:04
mvahoney the codewitch3-Jan-20 4:04 
GeneralRe: Visual Studio and WINE? Pin
dandy723-Jan-20 3:44
dandy723-Jan-20 3:44 
GeneralRe: Visual Studio and WINE? Pin
honey the codewitch3-Jan-20 4:02
mvahoney the codewitch3-Jan-20 4:02 
GeneralRe: Visual Studio and WINE? Pin
#realJSOP2-Jan-20 14:24
professional#realJSOP2-Jan-20 14:24 
GeneralRe: Visual Studio and WINE? Pin
Mark_Wallace2-Jan-20 23:57
Mark_Wallace2-Jan-20 23:57 

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.