How to define a grammar for a programming language

前端 未结 5 634
终归单人心
终归单人心 2021-01-30 09:08

How to define a grammar (context-free) for a new programming language (imperative programming language) that you want to design from scratch.

In other words: How do you

5条回答
  •  梦如初夏
    2021-01-30 09:52

    You'll want to have a look at EBNF (Extended Backus-Naur Form).

    (Assuming you want to write a context free grammar, that is.)

提交回复
热议问题