On Fri, 2007-05-25 at 11:34 -0700, Erick Tryzelaar wrote:
> Oh sorry, you're right. That should be:
>
> #syntax light
>
> whilst x do
> x = 1
> y = 2
>
> #endsyntax
You can do this now:
while { x } $$
x = 1
y = 2
;
because that uses a the
On Fri, 2007-05-25 at 17:39 +, Martin Percossi wrote:
> Erick Tryzelaar wrote:
> > #syntax light
> > whilst x do
> >x = 1
> >y = 2
> > done
> > #endsyntax
>
> I don't like this because users will forget about the one on the bottom,
> if, as I suspect they will, they surround the en
On Fri, 2007-05-25 at 10:24 -0700, Erick Tryzelaar wrote:
> We talked about this when skaller implemented "$$". I believe his reason
> against "#syntax light" was that it was a global declaration, and he'd
> prefer not to have them.
This is not quite the case: the first step is to get somethin
Martin Percossi wrote:
> Erick Tryzelaar wrote:
>
>> #syntax light
>> whilst x do
>>x = 1
>>y = 2
>> done
>> #endsyntax
>
> I don't like this because users will forget about the one on the bottom,
> if, as I suspect they will, they surround the entire file with the
> directives. Also, w
Erick Tryzelaar wrote:
> We talked about this when skaller implemented "$$". I believe his
> reason against "#syntax light" was that it was a global declaration,
> and he'd prefer not to have them. I think it may also complicate the
> lexer. One alternative idea (that I never mentioned) I did h
Martin Percossi wrote:
>> Optional indentation has just been implemented, but it requires
>> an introduction:
>>
>> whilst x do $$
>> x = 1
>> y = 2
>>
>> This integrates fairly seamlessly with free form, without
>> any special knowledge of the syntax. I'm not sure I
skaller wrote:
>What do you mean I can't inline? Felix inlines almost everything,
>inlining is its primary optimisation technique.
>
>
I mean you can't write
whilst x do #syntax light
x = 1
y = 2
Sorry, I overloaded the word inline there!
Cheers,
Martin
On Fri, 2007-05-25 at 16:37 +, Martin Percossi wrote:
> skaller wrote:
> You are of course completely right. Come to think of it, I remember a
> discussion about this on haskell list. Must be getting senile in my old
> age ;-)
Cool .. I was senile in my youth .. :)
> >Note also, Felix uses
skaller wrote:
>>Another cool thing: the use of backquotes to get infix notation. 5 `mod`
>>2 is just very nice in my opinion.
>>
>>
>
>Actually it sucks because backquotes can't be nested without
>gratuitous brackets
>
>
You are of course completely right. Come to think of it, I remember
On Thu, 2007-05-24 at 15:27 +, Martin Percossi wrote:
> Hello felix-list,
>
> I think it would be a good idea to try to shamelessly steal syntax ideas
> from haskell.
hehe .. already being done :)
> I think that haskell's syntax, and typeclasses, are its
> best features -- and you've alr
Hello felix-list,
I think it would be a good idea to try to shamelessly steal syntax ideas
from haskell. I think that haskell's syntax, and typeclasses, are its
best features -- and you've already got the latter! There would
obviously have to be some changes, because haskell, as a pure languag
On 18/05/07, skaller <[EMAIL PROTECTED]> wrote:
> On Fri, 2007-05-18 at 11:17 +0100, Ben Smith wrote:
>
> > I like the postfix form in Magma: eg
> > k := NumberField(u^2 + u + 2) where u is PolynomialRing(QQ).1;
>
> Speaking of Magma .. it's all C code isn't it?
> I wonder how a Felix binding to Ma
On Fri, 2007-05-18 at 11:17 +0100, Ben Smith wrote:
> I like the postfix form in Magma: eg
> k := NumberField(u^2 + u + 2) where u is PolynomialRing(QQ).1;
Speaking of Magma .. it's all C code isn't it?
I wonder how a Felix binding to Magma would look?
I think the point here is people, particula
On Fri, 2007-05-18 at 11:35 +0200, Rhythmic Fistman wrote:
> > Message: 4
> > Date: Thu, 17 May 2007 17:44:08 +1000
> > From: skaller <[EMAIL PROTECTED]>
> > I want to begin discussion how we should make the new grammar
> > and extension system look, so please comment! Vent your
> > pet hates and c
On Fri, 2007-05-18 at 02:31 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> > I think it is important to note that 'recognizable' symbols
> > will be domain specific. A mathematician will demand different
> > symbols to an economist.
> >
>
> This is what fortress does:
>
> http://research.sun
On Fri, 2007-05-18 at 02:13 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> Are you looking for tweaks to the grammar that can parse the same
> syntax, or are you also considering changing the syntax and semantics to
> make things simpler?
Refactoring: that's a complete rewrite, without gratui
On 17/05/07, skaller <[EMAIL PROTECTED]> wrote:
> Part 2 .. Notes on the Grammar
> **
> B. Expression grammar is basically 4 forms:
>
> prefixop expr
> expr postfixop
> expr infixop expr
> atom
>
> In this formulation, atom or operator can be compound,
> for exam
> Message: 4
> Date: Thu, 17 May 2007 17:44:08 +1000
> From: skaller <[EMAIL PROTECTED]>
> I want to begin discussion how we should make the new grammar
> and extension system look, so please comment! Vent your
> pet hates and complaints, make constructive and useless
> suggestions, be prepared for
skaller wrote:
> The actual operator can be a keyword of any sequence of
> special characters. Felix uses a longest match algorithm
> to lex sequences of special characters.
>
> To be modern, we might consider Unicode symbols. However,
> most of them are actually useless ;(
>
> Even the APL subset
skaller wrote:
> Part 0: Introduction.
> *
>
> Felix has a rather complex expression grammar. It has a limited ability
> to add new infix operators of a fixed precedence (although the
> preprocessor directive appears to permit a choice of precedence level).
>
> Now we have the e
Part 4. Characters and Symbols
***
It is unfortunate we have to deal with ASCII character set,
since it lacks many symbols.
In Felix we have magic associations:
fun add: int * int -> int;
val x = 1 + 2; // + is add ..
New infix operators can be defined by:
#inf
Part 3: what everyone knows
I think everyone 'knows' this ordering:
logic:
or
and
not
comparison:
< > <= >= <> != ==
arithmetic:
add + -
mult * /
exponent ^
naming:
.
There's some confusion over distribution of unary - over
exponentiation, and it
Part 2 .. Notes on the Grammar
**
A. Please see:
http://code.felix-lang.org/wiki/Expressions
for another summary of expressions.
B. Expression grammar is basically 4 forms:
prefixop expr
expr postfixop
expr infixop expr
atom
In this formulation, atom or ope
Part 0: Introduction.
*
Felix has a rather complex expression grammar. It has a limited ability
to add new infix operators of a fixed precedence (although the
preprocessor directive appears to permit a choice of precedence level).
Now we have the extensible GLR parser availabl
24 matches
Mail list logo