判断BNF语法是否模棱两可的最简单方法是什么? [英] What is the easiest way of telling whether a BNF grammar is ambiguous or not?

查看:110
本文介绍了判断BNF语法是否模棱两可的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就是说,有没有一种工具可以自动显示给定语法的完整语言,包括突出显示歧义(如果有的话)?

解决方案

There might be some peculiarity about BNF-style grammars, but in general, deciding whether a given context-free grammar (such as BNF) is ambiguous is not possible.

In short, there does not exist a tool because in general, that tool is mathematically impossible. There might be some special cases that could work for you, though.

这篇关于判断BNF语法是否模棱两可的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆