I want to make a super simple c like language that allows expressions, assignments, conditionals, calling built in functions and reading/writing built in variables.
Would people recommend lexx/yacc (flex/bison) for this?
It seems doing that id be able to put in text and get out an AST or bytecode that I could then use to generate c++ or Javascript or interpret at runtime.
Im tempted to do this myself from scratch and i have done so in the past, but thinking maybe not this time.
@demofox I used to despise parser generators. But now I think it kind of depends on how much experiment you need to do with the syntax. If it is a mature language, I'd say definitely go with a hand-written recursive-descent parser. For a new language where you need to experiment a lot, maybe a traditional parser generator is a better idea for prototyping.

@demofox By the way, I’ve seen PEGs mentioned. Unlike CFGs, PEGs are always unambiguous and always choose the first matching rule. Some people dislike it because they make it easier to introduce design mistakes in a PEG-based tool without noticing, whereas CFG-based parser generators typically report conflicts.

See: https://safinaskar.writeas.com/this-is-why-you-should-never-use-parser-combinators-and-peg

This is why you should never use parser combinators and PEG

Let me tell you why you should (nearly) never use PEG (parsing expression grammars). Nearly everything I will say applies to parser combi...

Askar Safin