Click here to Skip to main content
15,896,606 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: In defense of goto Pin
Greg Utas3-Jan-20 1:44
professionalGreg Utas3-Jan-20 1:44 
GeneralRe: In defense of goto Pin
H.Brydon4-Jan-20 16:21
professionalH.Brydon4-Jan-20 16:21 
GeneralRe: In defense of goto Pin
honey the codewitch4-Jan-20 17:00
mvahoney the codewitch4-Jan-20 17:00 
GeneralRe: In defense of goto Pin
Stefan_Lang5-Jan-20 22:22
Stefan_Lang5-Jan-20 22:22 
GeneralRe: In defense of goto Pin
honey the codewitch5-Jan-20 23:14
mvahoney the codewitch5-Jan-20 23:14 
GeneralRe: In defense of goto Pin
Stefan_Lang5-Jan-20 23:38
Stefan_Lang5-Jan-20 23:38 
GeneralRe: In defense of goto Pin
honey the codewitch6-Jan-20 6:43
mvahoney the codewitch6-Jan-20 6:43 
GeneralRe: In defense of goto Pin
Stefan_Lang7-Jan-20 22:03
Stefan_Lang7-Jan-20 22:03 
Normally I'd have to add a lot to these statements, but since you're generating code, I'll just say this:

Use whatever works for you. If VS can't handle the code your generator produces, then use another generator option, or a different generator. Discussing the pros and cons of the available methods is meaningless if your code doesn't compile.

That said, I'm not an expert on parsers, but I wonder whether it is the usual approach to implement one as a state machine. Wouldn't it be straightforward to just implement each rule of the grammar as a function that converts a string of tokens (recursively) into a syntax tree? IIRC, there's typically no need to maintain a global state, and therefore no need to construct a state engine. A state would only be needed in case of a context-dependend grammar/language. I may have missed it, but is that what you have to deal with - a context depended language?
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: In defense of goto Pin
honey the codewitch7-Jan-20 22:09
mvahoney the codewitch7-Jan-20 22:09 
GeneralRe: In defense of goto Pin
Stefan_Lang7-Jan-20 23:36
Stefan_Lang7-Jan-20 23:36 
GeneralRe: In defense of goto Pin
Stefan_Lang5-Jan-20 22:38
Stefan_Lang5-Jan-20 22:38 
GeneralRe: In defense of goto Pin
honey the codewitch5-Jan-20 23:15
mvahoney the codewitch5-Jan-20 23:15 
GeneralMini CCCs 160 Pin
Tim Deveaux2-Jan-20 17:30
Tim Deveaux2-Jan-20 17:30 
GeneralRe: Mini CCCs 160 Pin
OriginalGriff2-Jan-20 19:55
mveOriginalGriff2-Jan-20 19:55 
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 
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 

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.