[Grace-core] Some comments from Tijs on parsing Grace

James Noble kjx at ecs.vuw.ac.nz
Wed Jul 27 17:34:45 PDT 2016


>> egrep "^(.*)method(.*))(.*),"   `find . -name \*.grace` |grep -v \} | grep -vi test
> 
> What are you trying to accomplish with this?

Find methods with more than one argument in the second or subsequent parts. If there aren't any - I can only see them in tests - then we have an option of simplifying things. 

> Now that [ _ ] is no longer an operator, I don’t think that there is a big problem using them for both lineups and type parameters. 

You'd have to make it space sensitive, or disambiguate some other way. 
m [ Foo ]
Generic call of m/0 or lineup call of m/1?
Could disambiguate based on the contents: if Foo is a type then it's generic, otherwise it's a lineup.  That's even worse than lineups and [[ ]] combined. 

> But using ⟦ and ⟧ is so much more geeky!

I'm typing this on my phone - I can't see any characters betwee using ... anc ... is

> Our development version of the web IDE lets you type [[ (without a space) and translates it to ⟦.   So I hope that the vinegar won’t be too strong. 

If it's doing that, the Right Thing is to put   and   into the language instead of ]]]]. Haven't you already got the   brackets for uninterpreted strings?  With no ascii equivalence. 
Put the Unicode (only) in the parser, delete the trigraph equivalences from the language, and just rely on the IDE.  Simpler snd easier all around then supporting both. 

J



More information about the Grace-core mailing list