2008/10/9 Stéphane Ducasse <stephane.ducasse@inria.fr>:
Apparently #2 value is a number? but the parser parses it.
hello stef, recently i poked with scanner/parser and i wonder what possible literals/combinations are correct and what is not: - a well known: #word , #keyword(s) -- Symbolic literal #- #* ... etc. Symbolic literal #( ...) -- array literal - now what about these: #123 -- number, or '123' asSymbol? ##( ... ) --- ?? ##word --- ?? ##... -- ??? ###... --- ???
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
Igor Stasenko <siguctua@...> writes:
hello stef,
recently i poked with scanner/parser and i wonder what possible literals/combinations are correct and what is not:
- a well known:
#word , #keyword(s) -- Symbolic literal #- #* ... etc. Symbolic literal #( ...) -- array literal
- now what about these:
#123 -- number, or '123' asSymbol?
##( ... ) --- ?? ##word --- ?? ##... -- ??? ###... --- ???
Hehe that reminds me http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117145.html http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117153.html I see not all are fixed in old compiler. Also note the discrepancy between parsing and printing You might want to fix #isLiteralSymbol: too...
Yeap it would be good to fix that. for me #2 -> #'2' ## -> #'#' #something that is not a ( should be #'something' Stef On Oct 10, 2008, at 5:38 PM, nicolas cellier wrote:
Igor Stasenko <siguctua@...> writes:
hello stef,
recently i poked with scanner/parser and i wonder what possible literals/combinations are correct and what is not:
- a well known:
#word , #keyword(s) -- Symbolic literal #- #* ... etc. Symbolic literal #( ...) -- array literal
- now what about these:
#123 -- number, or '123' asSymbol?
##( ... ) --- ?? ##word --- ?? ##... -- ??? ###... --- ???
Hehe
that reminds me http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117145.html http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117153.html
I see not all are fixed in old compiler. Also note the discrepancy between parsing and printing You might want to fix #isLiteralSymbol: too...
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2008/10/10 Stéphane Ducasse <stephane.ducasse@inria.fr>:
Yeap it would be good to fix that. for me
#2 -> #'2' ## -> #'#'
so, ##word should be treated as: '#' asSymbol word ?
#something that is not a ( should be #'something'
Stef
On Oct 10, 2008, at 5:38 PM, nicolas cellier wrote:
Igor Stasenko <siguctua@...> writes:
hello stef,
recently i poked with scanner/parser and i wonder what possible literals/combinations are correct and what is not:
- a well known:
#word , #keyword(s) -- Symbolic literal #- #* ... etc. Symbolic literal #( ...) -- array literal
- now what about these:
#123 -- number, or '123' asSymbol?
##( ... ) --- ?? ##word --- ?? ##... -- ??? ###... --- ???
Hehe
that reminds me
http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117145.html
http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117153.html
I see not all are fixed in old compiler. Also note the discrepancy between parsing and printing You might want to fix #isLiteralSymbol: too...
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
Yeap it would be good to fix that. for me
#2 -> #'2' ## -> #'#'
so, ##word should be treated as:
'#' asSymbol word
'#' asSymbol produces #'#' so I do not know if this is what I want but we could have #something -> #'something' so #123 - returns a symbol and not a number. and keep #( #{ #( for stuff if we want in the futur. #[ ] #{ } #( )
Igor Stasenko <siguctua@...> writes:
2008/10/10 Stéphane Ducasse <stephane.ducasse <at> inria.fr>:
Yeap it would be good to fix that. for me
#2 -> #'2' ## -> #'#'
so, ##word should be treated as:
'#' asSymbol word
?
## is questionable: we can accept such a syntax, but what for exactly? If no valuable reason, shouldn't we better enforce syntaxic check in Parser and signal malformed statements as an error as would any other Smalltalk? Quite sure that NewCompiler already fix all this stuff. What are the plans about its integration? Waiting for Eliot's COG?
nicolas cellier <ncellier@...> writes:
## is questionable: we can accept such a syntax, but what for exactly?
If no valuable reason, shouldn't we better enforce syntaxic check in Parser and signal malformed statements as an error as would any other Smalltalk?
Quite sure that NewCompiler already fix all this stuff. What are the plans about its integration? Waiting for Eliot's COG?
Anyway, even with NewCompiler, #isLiteralSymbol: and also #numArgs need fixes. These two are probably related to alternate syntax experiments. Google this one: alternate syntax site:lists.squeakfoundation.org Since bugs are hanging around for too long, it is high time to correct. http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-April/005341.htm... http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-March/075166.htm... http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117145.html and also: http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-July/119095.html Pharo is the ideal place to commit these changes. I will give it a try.
nicolas cellier <ncellier@...> writes:
Anyway, even with NewCompiler, #isLiteralSymbol: and also #numArgs need fixes. These two are probably related to alternate syntax experiments. Google this one: alternate syntax site:lists.squeakfoundation.org
Since bugs are hanging around for too long, it is high time to correct.
http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-April/005341.htm... http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-March/075166.htm... http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117145.html
and also: http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-July/119095.html
Pharo is the ideal place to commit these changes. I will give it a try.
For #isLiteralSymbol: See issue http://code.google.com/p/pharo/issues/detail?id=236 For test and patch see PharoInbox Compiler-nice.73 Nicolas
excellent! Stef On Oct 10, 2008, at 9:28 PM, nicolas cellier wrote:
nicolas cellier <ncellier@...> writes:
## is questionable: we can accept such a syntax, but what for exactly?
If no valuable reason, shouldn't we better enforce syntaxic check in Parser and signal malformed statements as an error as would any other Smalltalk?
Quite sure that NewCompiler already fix all this stuff. What are the plans about its integration? Waiting for Eliot's COG?
Anyway, even with NewCompiler, #isLiteralSymbol: and also #numArgs need fixes. These two are probably related to alternate syntax experiments. Google this one: alternate syntax site:lists.squeakfoundation.org
Since bugs are hanging around for too long, it is high time to correct.
http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-April/005341.htm... http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-March/075166.htm... http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-May/117145.html
and also: http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-July/119095.html
Pharo is the ideal place to commit these changes. I will give it a try.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Igor Stasenko -
nicolas cellier -
Stéphane Ducasse