是否有MKS Yacc的替代方案支持“选择偏好语法"?或非常相似的东西? [英] Is there an alternative to MKS Yacc that supports "selection preference syntax" or something very similar?

查看:102
本文介绍了是否有MKS Yacc的替代方案支持“选择偏好语法"?或非常相似的东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MKS Yacc支持一种表示法,其网站将其称为"选择偏好语法".它没有显示,但是由方括号中的标记组成,并可选地带有尖号,它表示必须遵循或不遵循其余规则的特定标记:

MKS Yacc supports a notation which their web site calls "selection preference syntax". It isn't illustrated, but it consists of a token in square brackets, optionally with a caret, and it indicates that a particular token is required to follow, or is required not to follow, the rest of the rules:

non_terminal:  TOKEN1 non_terminal2 TOKEN2 [TOKEN3]

non_terminal:  TOKEN1 non_terminal2 TOKEN2 [^TOKEN3]

(我不清楚方括号中的项目是否可以是非终结符.我使用该符号看到的代码始终使用一个令牌或几个以空格分隔的令牌,而从未使用非终结符.)

(I'm not clear whether the bracketed item can be a non-terminal. The code I've seen using the notation always uses a token or a couple of space separated tokens, and never a non-terminal.)

是否有人知道可以在Unix或Linux机器上运行(最好以源格式提供)的,提供相同支持(符号可以不同-功能不能)的,与Yacc兼容的替代系统(最好是开源的)?

Is anyone aware of an alternative Yacc-compatible system (preferably open source) that provides the same support (notation can differ - functionality can't), running on Unix or Linux machines, preferably available in source format?

(MKS Yacc还为处理错误和调整错误行为提供了一定的灵活性.一种可用的方法是,在遇到关键字时将关键字视为标识符时,将其视为没有意义的位置.我能够将其改装为byacc-Berkeley Yacc-但我还没有花费足够的时间来研究如何处理选择偏好".)

(MKS Yacc also provides some flexibility in handling errors and adjusting the error behaviour. One way in which that can be used is to treat keywords as identifiers when they are encountered in a position that makes no sense when they are treated as keywords. I was able to retrofit that into byacc - Berkeley Yacc - but I haven't spent enough time working out how to handle 'selection preferences'.)

另请参阅:有人使用了选择偏好"机制由MKS Yacc提供?

推荐答案

仅出于完整性考虑,由于我在答案中将其链接到您的其他版本,因此似乎有一个,类似于yacc,并支持选择器语法.它们位于Kitchner,并且显然与MKS紧密相关,但是从网站上看,它们似乎也负责MKS的文档编制,因此,如果其他所有方法都失败了,您可以称呼他们为询问这些选择偏好的含义. ;-)

Just for completeness, since I linked this in the answer to your other version, there appears to be a product from Thinkage called YAY, which is yacc-like and supports the selector syntax. They're in Kitchner and apparently closely associated with MKS, but from the website they also appear to be responsible for MKS's documentation, so maybe if all else fails you can call them as ask what the hell they meant by these selection preferences. ;-)

这篇关于是否有MKS Yacc的替代方案支持“选择偏好语法"?或非常相似的东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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