badc0re
badc0re

Reputation: 3523

lex/yacc simple Q

Can lex and yacc be used for making a programming language? and any recommendation for some books.

some references ?

So far i have found some like :

Build code with lex and yacc, Part 1: Introduction

Upvotes: 0

Views: 277

Answers (1)

David Gorsline
David Gorsline

Reputation: 5018

Yes, you can certainly use lex and yacc to build a compiler/translator for a programming or scripting language. There are GNU variants of these tools, called flex and bison. John Levine's lex & yacc was for many years the gold standard for books about these tools. That book may be out of print, but I expect that the successor book, Flex & Bison, is just as good. To dig deeper into building a compiler, start with Aho et al., Compilers: Principles, Techniques, and Tools, 2/e. (Again, my recommendation is based on the first edition of this book.)

Upvotes: 1

Related Questions