#17378: Preparser gets lost with iterated ellipsis_range
------------------------------+----------------------------
   Reporter:  tmonteil        |            Owner:
       Type:  defect          |           Status:  new
   Priority:  major           |        Milestone:  sage-6.5
  Component:  user interface  |         Keywords:
  Merged in:                  |          Authors:
  Reviewers:                  |  Report Upstream:  N/A
Work issues:                  |           Branch:
     Commit:                  |     Dependencies:
   Stopgaps:                  |
------------------------------+----------------------------
 Here is a bug reported during a workshop at Villetaneuse today:

 {{{
 sage: [1..10]
 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
 sage: len([1..10])
 10
 sage: [1..len([1..10])]
 [1, 2, 3]
 }}}

 After a quick look, it seems that there is a preparsing problem,
 `[1..len([1..10])]` should be preparsed as something like:

 {{{
 
(ellipsis_range(Integer(1),Ellipsis,len(ellipsis_range(Integer(1),Ellipsis,Integer(10)))))
 }}}

 but it is currently preparsed as:

 {{{
 sage: preparse('[1..len([1..10])]')
 '(ellipsis_range(Integer(1),Ellipsis,len([Integer(1),Ellipsis,Integer(10)])))'
 }}}

 (the second `ellipsis_range` disappeared).

--
Ticket URL: <http://trac.sagemath.org/ticket/17378>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to