Hello,For predefined sorts and others, you may also look in the source:Line 242 to line 283And:Line 96 to line 147/There are some at other places…
From pats_lexing.dats
==============================================================================
Comment starts:
/*
//
////
Keywords:
abst
abst@ype
absviewt
absviewt@ype
absvt
absvt@ype
addr
addr@
case
case+
case-
fix
fix@
fold
fold@
for
for*
free
free@
lam
lam@
llam
llam@
prop
prop+
prop-
ref
ref@
t
t0ype (= t@ype)
t0ype+
t0ype-
t@ype
t@ype (= t0ype)
type
type+
type-
val
val+
val-
view
view+
view-
view@
viewt
viewt0ype (= viewt@ype)
viewt0ype+
viewt0ype-
viewt@ype
viewt@ype (= viewt0ype)
viewtype
viewtype+
viewtype-
vt
vt0ype (= vt@ype)
vt0ype+
vt0ype-
vt@ype
vt@ype (= vt0ype)
vtype
vtype+
vtype-
while
while*
From pats_lexing.sats
==============================================================================
Keywords:
absview
absviewt@ype
absviewtype
addr@
and
as
assume
begin
case
case+
case-
classdec
dataprop
datasort
datatype
dataview
dataviewtype
do
dynload
else
end
exception
extern
fix
fix@
fn
fnx
fold@
for
for*
free@
fun
if
implement
implmnt
import
in
infix
infixl
infixr
lam
lam@
let
llam
local
macdef
macrodef
nonfix
of
op
overload
postfix
prcase
prefix
prfn
prfun
primplmnt
propdef
prval
prvar
rec
ref@
scase
sif for static if
sortdef
stacst
stadef
staload
static
symelim
symintr
then
tkindef
try
type
type+
type-
typedef
val
val+
val-
var
view@
viewdef
viewtypedef
when
where
while
while*
with
Keywords from DML, now rarely used:
withtype
withprop
withview
withviewtype
Suspended keywords:
stavar
Function effects tags (not real keywords):
ntm
exn
ref
wrt
all
Preprocessor-like (not keywords and invalid as identifiers):
#assert
#codegen2
#codegen3
#define
#elif
#elifdef
#elifndef
#else
#endif
#error
#if
#ifdef
#ifndef
#include
#print
#require
#then
#undef
Special functions/values (not keywords and invalid as identifiers):
$
$arrpsz
$arrptrsize
$break
$continue
$d2ctype
$delay
$effmask
$extern
$extkind
$ldelay
$literal
$lst
$lst_t
$lst_vt
$myfilename
$myfunction
$mylocation
$raise
$rec
$rec_t
$rec_vt
$showtype
$solver_assert
$solver_verify
$tempenver
$tup
$tup_t
$tup_vt
$vcopyenv_v
$vcopyenv_vt
Punctuation-like:
{
|
}
~
!
#
#[
%(
'(
'[
'{
(
)
,
,(
-<
-<>
->
.
..
...
.<
.<>.
:
:<
;
<
<>
=
=/=>
=/=>>
=<
=<>
=>
=>>
>
>.
@
@(
@[
@{
[
\
]
`
`(
Special (a dot followed by a decimal integer):
.[0-9]+
Others (lexical):
alnum
symbol
A[...]
A<...>
$alnum
#alnum
character
float
cdata
string
line comment
block comment
rest-of-file comment
errors
end-of-file
Additionally, and as I needed it anyway for some personal use, here are lists of lexical units, keywords and other stuffs, taken from two sources. There are duplicates.
[…]
This is not a reference index of the keywords, this is yet to come …
[…]
This is great, a very useful reference. Is there any reason to keep the redundant keywords (implement vs. implmnt)? Seems like getting rid of them in ATS 3 would make it simpler.
Neat! I've resigned to the fact that the language-ats library
will have some bugs (and I'm hoping to avoid the scenario with
XATS), but this will definitely help out with the vim plugin and
test cases :)
In https://github.com/Hibou57/PostiATS-Utilities/tree/master/doc , I just added `syntax-guide.md`. It’s not yet finished but I’m telling now since I believe this will be a bit long. For the syntax, I’m using a simple but relevant enough set of rules for segmenting ATS2 source. The segments can nest. I checked with a dedicated parser it’s relevant. Later (probably in a rather far future), there will be inner syntax rules for what I call “segment parts” in the document. For now, I started to document the big lines construct and that’s what I will finish first before anything else.
For the anecdote, for parsing, I needed only two hacks: one for function effect expressions and one for `where` expression which is split in two sub‑hacks. The function effects hack is actually an hack in the lexer (which is in the repository). The `where` expression hack was needed because it was the only construct not matching well the simple model I used. The issue with it, was that it may contains expressions or list of declarations while its end marker is optional and it also can be written using braces paires. The parser is not in the repository, only the lexer.
--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/a159fde0-91bd-438b-bb85-a59b92253336%40googlegroups.com.
Neat! I've resigned to the fact that the language-ats library will have some bugs (and I'm hoping to avoid the scenario with XATS), but this will definitely help out with the vim plugin and test cases :)