gpt4 book ai didi

sml - 是否有自定义 sml 中缀的字符白名单或黑名单?

转载 作者:行者123 更新时间:2023-12-01 01:09:47 24 4
gpt4 key购买 nike

infix 3 ..错误。定义自定义中缀时允许或不允许哪些字符?我在哪里可以找到在线列表?

谢谢

最佳答案

您可以添加任何非限定标识符。

以下来自SML 90'定义

The following are the reserved words used in the Core. They may not (except =) be used as identifiers.

abstype and andalso as case do datatype else
end exception fn fun handle if in infix
infixr let local nonfix of op open orelse
raise rec then type val with withtype while
( ) [ ] { } , : ; ... _ | = => -> #


....

An identifier is either alphanumeric: any sequence of letters, digits or primes (') and underbars (_) starting with a letter or prime, or symbolic: any non-empty sequence of the following symbols:

! % & # + - / : < = > ? @ \ ~ ' ^ | *

In either case, however, reserved words are excluded. This means that for example # and | are not identifiers, but ## and |=| are identifiers. The only exception to this rule is that the symbol =, which is a reserved word, is also allowed as an identifier to stand for the equality predicate.

关于sml - 是否有自定义 sml 中缀的字符白名单或黑名单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16027185/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com