2009/9/17 Slava Pestov <[email protected]>: > On Thu, Sep 17, 2009 at 11:33 AM, Paul Moore <[email protected]> wrote: >> Look at it another way - if the 3/4 rational number syntax wasn't >> already part of factor, would I be able to add it in user code? The >> fact that the syntax isn't defined in math.ratio, implies to me that >> the answer is "no". > > Correct -- in the parser, every token is either a word or a number, > and while you can define all the new words you want, you cannot define > new forms of numeric literals. Sorry :-)
That's OK - a definite "no" was one of the possible responses I asked for, so thanks :-) Out of interest, is this just a design decision, or are there fundamental reasons why it's hard? At first glance, I would have thought that having a check in the parser just before the number conversion code, to run a user-defined "do you know how to parse this?" hook, would be easy enough. Paul. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
