GithubHelp home page GithubHelp logo

qfu / build-your-own-programming-language Goto Github PK

View Code? Open in Web Editor NEW

This project forked from packtpublishing/build-your-own-programming-language

0.0 0.0 0.0 362 KB

Build Your Own Programming Language, published by Packt

License: MIT License

Java 84.65% Makefile 1.49% Yacc 8.15% Lex 5.72%

build-your-own-programming-language's Introduction

Build Your Own Programming Language

Build Your Own Programming Language

This is the code repository for Build Your Own Programming Language , published by Packt.

A programmer's guide to designing compilers, interpreters, and DSLs for solving modern computing problems

What is this book about?

The need for different types of computer languages is growing rapidly and developers prefer creating domain-specific languages for solving specific application domain problems. Building your own programming language has its advantages. It can be your antidote to the ever-increasing size and complexity of software. However, creating a custom language isn't easy.

This book covers the following exciting features:

  • Perform requirements analysis for the new language and design language syntax and semantics.
  • Write lexical and context-free grammar rules for common expressions and control structures.
  • Develop a scanner that reads source code and generate a parser that checks syntax.
  • Build key data structures in a compiler and use your compiler to build a syntax-coloring code editor.
  • Implement a bytecode interpreter and run bytecode generated by your compiler.
  • Write tree traversals that insert information into the syntax tree.
  • Implement garbage collection in your language.

If you feel this book is for you, get your copy today!

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

procedure main(argv)
    simple := simple()
    yyin := open(argv[1])
    while i := yylex() do
        write(yytext, ": ", i)
end

Following is what you need for this book: This book is for software developers interested in the idea of inventing their own language or developing a domain-specific language. Computer science students taking compiler construction courses will also find this book highly useful as a practical guide to language implementation to supplement more theoretical textbooks. Intermediate-level knowledge and experience working with a high-level language such as Java or the C++ language are expected to help you get the most out of this book.

With the following software and hardware list you can run all code files present in the book (Chapter 1-17).

Software and Hardware List

Chapter Software required OS required
3-16 Uflex, Jflex, Unicon, Java Windows, Mac OS X, and Linux (Any)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Code in Action

The Code in Action videos for this book can be viewed at https://bit.ly/3njc15D.

Related products

Get to Know the Author

Clinton L. Jeffery is Professor and Chair of the Department of Computer Science and Engineering at New Mexico Institute of Mining and Technology. He received his B.S. from the University of Washington, and M.S. and Ph.D. degrees from the University of Arizona, all in computer science. He has conducted research and written many books and papers on programming languages, program monitoring, debugging, graphics, virtual environments, and visualization. With colleagues, he invented the Unicon programming language, hosted on the Unicon website.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781800204805

build-your-own-programming-language's People

Contributors

cjeffery avatar packt-itservice avatar solankikaran avatar packtutkarshr avatar stormmann avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.