If T_VIEWT is followed by “@type”, then these two pieces are combined to
form “viewt@ype”.
I kind of regret to form such a strange identifier
However, you don’t really need to deal with this kind of complexity. At
least, not at this stage.
You can always write “viewt0ype” instead, which is a normal identifier.On Sat, Dec 20, 2014 at 12:13 AM, Brandon Barker brandon...@gmail.com wrote:
Thanks,
I’ve gotten most of the way through it. It has made me realize that ATS is
even more rich (potentially) than I know, since I saw a number of reserved
tokens for either unused or rarely used features.
I have a question about the following:
| T_IDENT_alp of string
It seems this token can have several lexical matches. Maybe I am
interpreting incorrectly, but in any case, this group seems to consist of
proof-related words:
implement PERCENT = T_IDENT_alp “%”
implement QMARK = T_IDENT_alp “?”
implement REF = T_IDENT_alp “ref”
// HX: ref@ for flattened reference
But there are other tokens too in this class (e.g. T_VIEWAT). What
distinguishes the words that make up the T_IDENT_alp token?
On Friday, December 12, 2014 1:29:42 AM UTC-5, gmhwxi wrote:
It would be nice to implement a lexer for ATS2 based on JFlex.
It is a modest project but can be quite useful.
Given an ATS2 source file, the lexer can output a file of tokens in JSON
format.
There could be many ways to use such a file. For instance, use it for
doing syntax-highlighting.
It is also possible for modify the ATS2 compiler to take such a file as
another form of input.
For such uses, it is important to attach location information to tokens.
The datatype for tokens in ATS2 is declared in the following file:
On Thursday, December 11, 2014 8:00:59 PM UTC-5, Brandon Barker wrote:
I’m a bit rusty on this topic, and also, I don’t know enough about the
ATS grammar even if I wasn’t. Is it worth trying to lex ATS using such a
tool: http://jflex.de/?
On Fri, Nov 28, 2014 at 5:46 PM, Brandon Barker brand...@gmail.com wrote:
I did not realize until today that IntelliJ is not only free, but open
source. I’m liking it as well so far.
On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke rao...@gmail.com wrote:
The core problem is that it cannot save files. This means a browser
based idea is impossible in principle and in practice. It cannot
be done, end of story
Yes, right. A browser-based IDE can nevertheless make use of some
locally-hosted webserver via WebSockets.
Sure, or even POST. Still, the main problem is that for an IDE the graphics
and extremely complex state information are tightly coupled and it’s hard
to provide the mandatory maximum lag of 1/10 second required for
editing. In fact it’s hard enough to do that with a native graphic interface.
I used to build an IDE for ATS (not ATS 2) in Eclipse using XText. ( https://sites.google.com/site/alex2ren/what-i-built/atsintegreteddevelepmentenvironment).
However, the whole project is now obsolete since both Xtext and ATS have
been updated. Admittedly, Xtext is a very good platform for building IDE
for Domain Specific Language, but it’s not that useful for a full-fledged
language like ATS. It requires an encoding of ATS’ syntax using Antlr,
based on which Xtext can work its magic, like syntax highlighting and
cross-reference. Basically, most semantics has to be syntax based, I have
to tweak here and there to ask Xtext to do what I want. And it’s difficult
to add new features pertaining to ATS language such as caching the result
of the parsing of local ATS library (e.g. prelude).
For light weight development of ATS, I would say using emacs or Vim is
sufficient with simple syntax highlighting and ctags support. IMHO, a
common usage is to blend ATS with other programming languages such as C,
Java, or JavaScript. Therefore I favour the platform of Eclipse, which
already has plug-in supports for such languages. To be ambitious, I believe
a production level IDE of ATS would be something similar to CDT (Eclipse
C/C++ Development Toolkit) supporting multiple files, cross-reference for
terms in both statics and dynamics, prompt for type error, and etc.
Thank you for providing feedback on Xtext.
To be really ambitious, we should add support of local template code
management.
Please see pats_parsing_base.dats.
On Monday, December 22, 2014 9:05:00 PM UTC-5, Brandon Barker wrote:
Which token is for identifiers?
On Sat, Dec 20, 2014 at 1:31 PM, Brandon Barker < brand...@gmail.com> wrote:
OK, thanks, I seem to recall that there were differences in
writing down some of the literals in ATS versus C, but probably I am
mistaken. Also I can’t easily check much as I only have internet on my
phone for a few hours. Good time to translate the lexer though.
On Dec 20, 2014 1:25 PM, “gmhwxi” gmh...@gmail.com wrote:
The literals (chars, integers, floats, strings) are taken from C.
On Saturday, December 20, 2014 1:15:13 PM UTC-5, Brandon Barker wrote:
I found this one, but in case my ATS is rusty/incomplete, I was
hoping to find a definitive reference for the form of all literals. Not the
names of the tokens.
On Dec 20, 2014 1:06 PM, “Hongwei Xi” gmh...@gmail.com wrote:
The names of the tokens can be found at the end of the
following file:
If T_VIEWT is followed by “@type”, then these two pieces
are combined to form “viewt@ype”.
I kind of regret to form such a strange identifier
However, you don’t really need to deal with this kind of
complexity. At least, not at this stage.
You can always write “viewt0ype” instead, which is a normal
identifier.
On Sat, Dec 20, 2014 at 12:13 AM, Brandon Barker < brand...@gmail.com> wrote:
Thanks,
I’ve gotten most of the way through it. It has made me
realize that ATS is even more rich (potentially) than I know, since I saw a
number of reserved tokens for either unused or rarely used features.
I have a question about the following:
| T_IDENT_alp of string
It seems this token can have several lexical matches.
Maybe I am interpreting incorrectly, but in any case, this group seems to
consist of proof-related words:
implement PERCENT = T_IDENT_alp “%”
implement QMARK = T_IDENT_alp “?”
implement REF = T_IDENT_alp “ref”
// HX: ref@ for flattened reference
But there are other tokens too in this class
(e.g. T_VIEWAT). What distinguishes the words that make up the
T_IDENT_alp token?
On Friday, December 12, 2014 1:29:42 AM UTC-5, gmhwxi wrote:
It would be nice to implement a lexer for ATS2 based on
JFlex.
It is a modest project but can be quite useful.
Given an ATS2 source file, the lexer can output a file of
tokens in JSON format.
There could be many ways to use such a file. For
instance, use it for doing syntax-highlighting.
It is also possible for modify the ATS2 compiler to take
such a file as another form of input.
For such uses, it is important to attach location
information to tokens.
The datatype for tokens in ATS2 is declared in the
following file:
On Thursday, December 11, 2014 8:00:59 PM UTC-5, Brandon Barker wrote:
I’m a bit rusty on this topic, and also, I don’t know
enough about the ATS grammar even if I wasn’t. Is it worth trying to lex
ATS using such a tool: http://jflex.de/?
On Fri, Nov 28, 2014 at 5:46 PM, Brandon Barker < brand...@gmail.com> wrote:
I did not realize until today that IntelliJ is not only
free, but open source. I’m liking it as well so far.
On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke < rao...@gmail.com> wrote:
Say you want to implement something and you think the feature of callcc
can be a big help for your implementation. Then you can do your design in
ATS and use Scheme to provide callcc.
When using ATS to teach programming concepts, I often introduce an abstract
type:
abstype cont(a:type)
cont(T) is for a continuation receiving a value of type T.
Unfortunately, I could not create continuations in ATS. I had to use
closures
as fake continuations. If I have a tool from ATS to Scheme, then I can
create
genuine continuations.On Wed, Oct 15, 2014 at 4:15 PM, ‘Yannick Duchêne’ via ats-lang-users < ats-lan...@googlegroups.com> wrote:
Le mercredi 15 octobre 2014 19:25:12 UTC+2, gmhwxi a écrit :
Tangentially tangentially related:
I started my functional experience with Common Lisp and taught
Scheme for a couple of years. I do miss programming in Scheme a bit.
I think that the “right” way of programming in Scheme is that you do the
planning in ATS and the plumbing in Scheme.
Do you know a tiny example? I’m don’t understand what’s nice with
“plumbing in Scheme”.
However drracket IDE is great.
Do you try to use it?
No, I have never used DrRacket. I had some experience with DrScheme.
I don’t doubt DrRacket being great. The IDE that impressed me most in the
past was the one for SmallTalk; it was truly revolutionary in its days. I
heard that
Self’s IDE is great as well.
If you go ahead to build an IDE for ATS based on DrRacket, it will
certainly help
the ats-lang-users community!
True enough for the SmallTalk IDE (I tried it some many years ago). But in
my opinion, the main issue with all IDEs, is that there is no standard
abstract interface for language support… even a such basic thing as precise
syntax colourization is often an issue (for someone who is dreaming about
syntactical / semantic support, and not only token colourization, that’s
rather bad).
And also eclipse is very slow, big and having messy architecture.
This is absolutely true. We can probably say the same thing about Linux as
well
Yes, while at least it has the advantage of being more lightweight than any
of the latest Windows versions (I don’t know for Mac OS).
In the long run, we can and probably should build several IDEs for ATS:
ones for
light duties, ones for heavy duties, and maybe commercial ones as well
Any taker :)From: Mateusz Kowalczyk fuuz...@fuuzetsu.co.uk
Date: Tue, Oct 21, 2014 at 8:49 PM
Subject: Re: [ats-lang-users] An idea: How about make ATS language IDE
based on drracket?
To: ats-lan...@lists.sourceforge.net
Hi Artyom,
I’ve uploaded the (early, barely working) ATS language binding for
MonoDevelop:
At this point, it can (only) highlight various ATS keywords – it’s
basically a stub. Hopefully it will become much better over time.
It’s a GREAT product!!!
I can build it and use to edit ATS dats file.
If you’re only starting out writing such a thing, then maybe you would
consider Yi as a platform too. We certainly can do highlighting (our
lexers are generated by ‘alex’).
We plan in the future to allow better editing, something like Agda mode
for emacs. The advantage is that you can write your ATS editing mode in
Haskell, not ELisp I would certainly like to see another party come
and hack stuff in, request features &c. Maybe ATS would be our first
dependently-typed language. We certainly can’t claim to have the feature
set of an IDE though so I guess it depends what you’re after.
I have a question for the plugin.
Where is a correct location for MonoDevelop.ATSBinding.dll?
I selected MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.sln, and build
all.
Then I got DLLs at the following PATH.
$ mdtool setup pack
MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.addin.xml
MonoDevelop Add-in Setup Utility
WARNING: [MonoDevelop.ATSBinding,0.0.1] Could not load some add-in
assemblies: Could not find file
“/home/kiwamu/src/ATS-Postiats-ide/MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.dll”.
Creating package MonoDevelop.ATSBinding_0.0.1.mpack
FATAL ERROR [2014-10-22 02:57:50Z]: System.IO.FileNotFoundException:
Could not find file
“/home/kiwamu/src/ATS-Postiats-ide/MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.dll”.
Then, I copied the DLL.
$ cp MonoDevelop.ATSBinding/bin/Debug/MonoDevelop.ATSBinding.dll
MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.dll
$ mdtool setup pack
MonoDevelop.ATSBinding/MonoDevelop.ATSBinding.addin.xml
MonoDevelop Add-in Setup Utility
Creating package MonoDevelop.ATSBinding_0.0.1.mpack
$ file MonoDevelop.ATSBinding_0.0.1.mpack
MonoDevelop.ATSBinding_0.0.1.mpack: Zip archive data, at least v2.0 to
extract
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
IMHO, browser based app is more difficult to build than client application.
The reason it seems easy is that the web app has less functionality and is
less responsive.
Let’s not worry too much about the maintenance, distribution about the ATS
IDE at the moment. (Platform like eclipse has good support for that.) Let’s
focus on functionality. Keywords based syntax highlighting is basic. What
else do we want?
semantics based highlighting
When I hover upon an expression, I want prompt of type.
Cross reference
auto completion (at least for function name)
some visual indication for error in the file
My list is quite influenced by what JDT in eclipse can do. I have no doubt
that a web based IDE can do all of that, but I guess it would be slow.On Wednesday, November 26, 2014 9:25:09 AM UTC-5, John Skaller wrote:
On 26/11/2014, at 7:41 PM, Artyom Shalkhakov wrote:
The core problem is that it cannot save files. This means a browser
based idea is impossible in principle and in practice. It cannot
be done, end of story
Yes, right. A browser-based IDE can nevertheless make use of some
locally-hosted webserver via WebSockets.
Sure, or even POST. Still, the main problem is that for an IDE the
graphics
and extremely complex state information are tightly coupled and it’s hard
to provide the mandatory maximum lag of 1/10 second required for
editing. In fact it’s hard enough to do that with a native graphic
interface.
If T_VIEWT is followed by “@type”, then these two pieces are combined
to form “viewt@ype”.
I kind of regret to form such a strange identifier
However, you don’t really need to deal with this kind of complexity. At
least, not at this stage.
You can always write “viewt0ype” instead, which is a normal identifier.
I’ve gotten most of the way through it. It has made me realize that
ATS is even more rich (potentially) than I know, since I saw a number of
reserved tokens for either unused or rarely used features.
I have a question about the following:
| T_IDENT_alp of string
It seems this token can have several lexical matches. Maybe I am
interpreting incorrectly, but in any case, this group seems to consist of
proof-related words:
implement PERCENT = T_IDENT_alp “%”
implement QMARK = T_IDENT_alp “?”
implement REF = T_IDENT_alp “ref”
// HX: ref@ for flattened reference
But there are other tokens too in this class (e.g. T_VIEWAT). What
distinguishes the words that make up the T_IDENT_alp token?
On Friday, December 12, 2014 1:29:42 AM UTC-5, gmhwxi wrote:
It would be nice to implement a lexer for ATS2 based on JFlex.
It is a modest project but can be quite useful.
Given an ATS2 source file, the lexer can output a file of tokens in
JSON format.
There could be many ways to use such a file. For instance, use it for
doing syntax-highlighting.
It is also possible for modify the ATS2 compiler to take such a file
as another form of input.
For such uses, it is important to attach location information to
tokens.
The datatype for tokens in ATS2 is declared in the following file:
On Thursday, December 11, 2014 8:00:59 PM UTC-5, Brandon Barker wrote:
I’m a bit rusty on this topic, and also, I don’t know enough about
the ATS grammar even if I wasn’t. Is it worth trying to lex ATS using such
a tool: http://jflex.de/?
On Fri, Nov 28, 2014 at 5:46 PM, Brandon Barker < brand...@gmail.com> wrote:
I did not realize until today that IntelliJ is not only free, but
open source. I’m liking it as well so far.
On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke rao...@gmail.com wrote:
I did not realize until today that IntelliJ is not only free, but open
source. I’m liking it as well so far.On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke rao...@gmail.com wrote:
I started my functional experience with Common Lisp and taught
Scheme for a couple of years. I do miss programming in Scheme a bit.
I think that the “right” way of programming in Scheme is that you do the
planning in ATS and the plumbing in Scheme. I will try to find a bit of
time to write a code generator from ATS-target to Scheme.
Cheers!On Wednesday, October 15, 2014 12:11:35 PM UTC-4, Barry Schwartz wrote:
The other side, professional people would like to challenge some tricky
things,
such like designing own operating system using ATS2.
Then they will love vi or Emacs than IDE.
Racket’s drracket IDE is focusing for beginners and for education.
Tangentially related: Racket also has good Emacs support via Geiser. I
know of it because Geiser also supports Guile, and I am a Guile user
and diehard Emacs user. If IDE development goes along with
corresponding Emacs support, I’ll be quite happy. (I’m not much of an
elisper, myself.)
Humor: Racket also is interesting because of the Typed Racket dialect,
which seems unusually well thought out, judging from the docs. What we
need next, however, is Applied Typed Racket.
Or using the Eclipse framework? Alex Ren tried it a few years ago
and it was a very positive experience.
Using racket means that we ourselves have to do so many things
from scratch. Eclipse can provide a much needed ecosystem for us.
I assume that using MonoDevelop will give us a big ecosystem as well.
For the bad points, Eclipse is huge and is Java (I had a bad feeling of
both Eclipse and jEdit, both Java), and MonoDevelop rely on Mono which is
not mainstream any‑more on some platforms, including at least Ubuntu (I’m
not even sure it’s still supported at all).
The literals (chars, integers, floats, strings) are taken from C.On Saturday, December 20, 2014 1:15:13 PM UTC-5, Brandon Barker wrote:
I found this one, but in case my ATS is rusty/incomplete, I was hoping to
find a definitive reference for the form of all literals. Not the names of
the tokens.
On Dec 20, 2014 1:06 PM, “Hongwei Xi” <gmh...@gmail.com <javascript:>> wrote:
The names of the tokens can be found at the end of the following file:
On Sat, Dec 20, 2014 at 12:45 PM, Brandon Barker <brand...@gmail.com <javascript:>> wrote:
Sorry! Literal tokens.
On Dec 20, 2014 12:21 PM, “Hongwei Xi” <gmh...@gmail.com <javascript:>> wrote:
What do mean by ‘literal types’?
On Sat, Dec 20, 2014 at 12:10 PM, Brandon Barker <brand...@gmail.com <javascript:>> wrote:
Thanks, I think this helped, but I am still not sure on some points
(this can be worried about later, as you say).
More importantly, which parsing source file, if any, contains the most
straightforward definitions of various literal types in ATS?
On Dec 20, 2014 2:06 AM, “Hongwei Xi” <gmh...@gmail.com <javascript:>> wrote:
It is getting a bit involved.
If T_VIEWT is followed by “@type”, then these two pieces are combined
to form “viewt@ype”.
I kind of regret to form such a strange identifier
However, you don’t really need to deal with this kind of complexity.
At least, not at this stage.
You can always write “viewt0ype” instead, which is a normal
identifier.
On Sat, Dec 20, 2014 at 12:13 AM, Brandon Barker < brand...@gmail.com <javascript:>> wrote:
Thanks,
I’ve gotten most of the way through it. It has made me realize that
ATS is even more rich (potentially) than I know, since I saw a number of
reserved tokens for either unused or rarely used features.
I have a question about the following:
| T_IDENT_alp of string
It seems this token can have several lexical matches. Maybe I am
interpreting incorrectly, but in any case, this group seems to consist of
proof-related words:
implement PERCENT = T_IDENT_alp “%”
implement QMARK = T_IDENT_alp “?”
implement REF = T_IDENT_alp “ref”
// HX: ref@ for flattened reference
But there are other tokens too in this class (e.g. T_VIEWAT). What
distinguishes the words that make up the T_IDENT_alp token?
On Friday, December 12, 2014 1:29:42 AM UTC-5, gmhwxi wrote:
It would be nice to implement a lexer for ATS2 based on JFlex.
It is a modest project but can be quite useful.
Given an ATS2 source file, the lexer can output a file of tokens in
JSON format.
There could be many ways to use such a file. For instance, use it
for doing syntax-highlighting.
It is also possible for modify the ATS2 compiler to take such a
file as another form of input.
For such uses, it is important to attach location information to
tokens.
The datatype for tokens in ATS2 is declared in the following file:
On Thursday, December 11, 2014 8:00:59 PM UTC-5, Brandon Barker wrote:
I’m a bit rusty on this topic, and also, I don’t know enough about
the ATS grammar even if I wasn’t. Is it worth trying to lex ATS using such
a tool: http://jflex.de/?
On Fri, Nov 28, 2014 at 5:46 PM, Brandon Barker < brand...@gmail.com> wrote:
I did not realize until today that IntelliJ is not only free, but
open source. I’m liking it as well so far.
On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke rao...@gmail.com wrote:
I’ve gotten most of the way through it. It has made me realize that ATS is
even more rich (potentially) than I know, since I saw a number of reserved
tokens for either unused or rarely used features.
I have a question about the following:
| T_IDENT_alp of string
It seems this token can have several lexical matches. Maybe I am
interpreting incorrectly, but in any case, this group seems to consist of
proof-related words:
implement PERCENT = T_IDENT_alp “%”
implement QMARK = T_IDENT_alp “?”
implement REF = T_IDENT_alp “ref”
// HX: ref@ for flattened reference
But there are other tokens too in this class (e.g. T_VIEWAT). What
distinguishes the words that make up the T_IDENT_alp token?On Friday, December 12, 2014 1:29:42 AM UTC-5, gmhwxi wrote:
It would be nice to implement a lexer for ATS2 based on JFlex.
It is a modest project but can be quite useful.
Given an ATS2 source file, the lexer can output a file of tokens in JSON
format.
There could be many ways to use such a file. For instance, use it for
doing syntax-highlighting.
It is also possible for modify the ATS2 compiler to take such a file as
another form of input.
For such uses, it is important to attach location information to tokens.
The datatype for tokens in ATS2 is declared in the following file:
On Thursday, December 11, 2014 8:00:59 PM UTC-5, Brandon Barker wrote:
I’m a bit rusty on this topic, and also, I don’t know enough about the
ATS grammar even if I wasn’t. Is it worth trying to lex ATS using such a
tool: http://jflex.de/?
On Fri, Nov 28, 2014 at 5:46 PM, Brandon Barker brand...@gmail.com wrote:
I did not realize until today that IntelliJ is not only free, but open
source. I’m liking it as well so far.
On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke rao...@gmail.com wrote:
generally speaking, i think intellij is the more hip and trendy thing
than anything else in java land; they are now the sweet honey friend
of google android, eclipse is getting the shaft sorta. and they have
ides for other things as well like appcode. and they support other
languages via plug-ins e.g. scala or erlang or whatever. on the whole
i sorta like intellij better than eclipse, although at work for
android we still use eclipse. (i haven’t used netbeans in years. it is
an underdog in terms of mindshare, fwiw.) all 3 of eclipse, intellij,
and netbeans are java-based i think which tends to mean they are not
very snappy. try using xcode by comparison. what the heck is
visualstudio written in these days, i assume .net?
no, there’s not much of a point to this message.
i think the only way the ATS IDE choice should be made is by somebody
dusting off their hands and making a plugin for whichever IDE they
favor. then everybody can follow that blazed trail. just sitting
around doing bike shed discussions isn’t as useful
True enough, but I have the ulterior motive of needing to use Java
anyway…
Probably for now, any of them will do the trick. I like to not have to deal
with licenses unless absolutely necessary, costs aside, so I didn’t try
IntelliJ. Maybe it is worth it.
Please see pats_parsing_base.dats.On Monday, December 22, 2014 9:05:00 PM UTC-5, Brandon Barker wrote:
Which token is for identifiers?
On Sat, Dec 20, 2014 at 1:31 PM, Brandon Barker <brand...@gmail.com <javascript:>> wrote:
OK, thanks, I seem to recall that there were differences in writing down
some of the literals in ATS versus C, but probably I am mistaken. Also I
can’t easily check much as I only have internet on my phone for a few
hours. Good time to translate the lexer though.
On Dec 20, 2014 1:25 PM, “gmhwxi” <gmh...@gmail.com <javascript:>> wrote:
The literals (chars, integers, floats, strings) are taken from C.
On Saturday, December 20, 2014 1:15:13 PM UTC-5, Brandon Barker wrote:
I found this one, but in case my ATS is rusty/incomplete, I was hoping
to find a definitive reference for the form of all literals. Not the names
of the tokens.
On Dec 20, 2014 1:06 PM, “Hongwei Xi” gmh...@gmail.com wrote:
The names of the tokens can be found at the end of the following file:
If T_VIEWT is followed by “@type”, then these two pieces are
combined to form “viewt@ype”.
I kind of regret to form such a strange identifier
However, you don’t really need to deal with this kind of
complexity. At least, not at this stage.
You can always write “viewt0ype” instead, which is a normal
identifier.
On Sat, Dec 20, 2014 at 12:13 AM, Brandon Barker < brand...@gmail.com> wrote:
Thanks,
I’ve gotten most of the way through it. It has made me realize
that ATS is even more rich (potentially) than I know, since I saw a number
of reserved tokens for either unused or rarely used features.
I have a question about the following:
| T_IDENT_alp of string
It seems this token can have several lexical matches. Maybe I am
interpreting incorrectly, but in any case, this group seems to consist of
proof-related words:
implement PERCENT = T_IDENT_alp “%”
implement QMARK = T_IDENT_alp “?”
implement REF = T_IDENT_alp “ref”
// HX: ref@ for flattened reference
But there are other tokens too in this class (e.g. T_VIEWAT).
What distinguishes the words that make up the T_IDENT_alp token?
On Friday, December 12, 2014 1:29:42 AM UTC-5, gmhwxi wrote:
It would be nice to implement a lexer for ATS2 based on JFlex.
It is a modest project but can be quite useful.
Given an ATS2 source file, the lexer can output a file of tokens
in JSON format.
There could be many ways to use such a file. For instance, use
it for doing syntax-highlighting.
It is also possible for modify the ATS2 compiler to take such a
file as another form of input.
For such uses, it is important to attach location information to
tokens.
The datatype for tokens in ATS2 is declared in the following
file:
On Thursday, December 11, 2014 8:00:59 PM UTC-5, Brandon Barker wrote:
I’m a bit rusty on this topic, and also, I don’t know enough
about the ATS grammar even if I wasn’t. Is it worth trying to lex ATS using
such a tool: http://jflex.de/?
On Fri, Nov 28, 2014 at 5:46 PM, Brandon Barker < brand...@gmail.com> wrote:
I did not realize until today that IntelliJ is not only free,
but open source. I’m liking it as well so far.
On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke <rao...@gmail.com wrote:
Also, comment tokens (which I am pretty clear on, but I do not know what a
rest-of-file comment is in ATS).On Dec 20, 2014 12:47 PM, “Brandon Barker” brandon...@gmail.com wrote:
E.g. T_FLOAT, T_CHAR
On Dec 20, 2014 12:45 PM, “Brandon Barker” brandon...@gmail.com wrote:
Sorry! Literal tokens.
On Dec 20, 2014 12:21 PM, “Hongwei Xi” gmh...@gmail.com wrote:
If T_VIEWT is followed by “@type”, then these two pieces are combined
to form “viewt@ype”.
I kind of regret to form such a strange identifier
However, you don’t really need to deal with this kind of complexity.
At least, not at this stage.
You can always write “viewt0ype” instead, which is a normal identifier.
I’ve gotten most of the way through it. It has made me realize that
ATS is even more rich (potentially) than I know, since I saw a number of
reserved tokens for either unused or rarely used features.
I have a question about the following:
| T_IDENT_alp of string
It seems this token can have several lexical matches. Maybe I am
interpreting incorrectly, but in any case, this group seems to consist of
proof-related words:
implement PERCENT = T_IDENT_alp “%”
implement QMARK = T_IDENT_alp “?”
implement REF = T_IDENT_alp “ref”
// HX: ref@ for flattened reference
But there are other tokens too in this class (e.g. T_VIEWAT). What
distinguishes the words that make up the T_IDENT_alp token?
On Friday, December 12, 2014 1:29:42 AM UTC-5, gmhwxi wrote:
It would be nice to implement a lexer for ATS2 based on JFlex.
It is a modest project but can be quite useful.
Given an ATS2 source file, the lexer can output a file of tokens in
JSON format.
There could be many ways to use such a file. For instance, use it
for doing syntax-highlighting.
It is also possible for modify the ATS2 compiler to take such a file
as another form of input.
For such uses, it is important to attach location information to
tokens.
The datatype for tokens in ATS2 is declared in the following file:
On Thursday, December 11, 2014 8:00:59 PM UTC-5, Brandon Barker wrote:
I’m a bit rusty on this topic, and also, I don’t know enough about
the ATS grammar even if I wasn’t. Is it worth trying to lex ATS using such
a tool: http://jflex.de/?
On Fri, Nov 28, 2014 at 5:46 PM, Brandon Barker < brand...@gmail.com> wrote:
I did not realize until today that IntelliJ is not only free, but
open source. I’m liking it as well so far.
On Tue, Nov 25, 2014 at 12:39 PM, Raoul Duke rao...@gmail.com wrote: