How to convert BNF to EBNF

后端 未结 2 1752
别跟我提以往
别跟我提以往 2020-11-28 14:46

How can I convert this BNF to EBNF?

 ::= var ;
 ::=  {;}


        
2条回答
  •  没有蜡笔的小新
    2020-11-28 15:15

    Remove the angle brackets and put all terminals into quotes:

    vardec ::= "var" vardeclist;
    vardeclist ::= varandtype { ";" varandtype }
    varandtype ::= ident { "," ident } ":" typespec
    ident ::= letter { idchar }
    idchar ::= letter | digit | "_"
    

提交回复
热议问题