Bug 5370

Summary: print arr[1:2]
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Teresa Thomas <tthomas>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Project(s) to access: ssh public key:
Bug Depends on:    
Bug Blocks: 2246    

Description Andrew Cagney 2007-11-20 15:34:25 UTC
Slice an array, returning a sub-section of the array.
Comment 1 Teresa Thomas 2007-11-21 20:15:39 UTC
    Slice operation for array types.
    
    frysk-core/frysk/value/ChangeLog
    2007-11-21  Teresa Thomas  <tthomas@redhat.com>
    
    	* ArrayType.java (slice): New.
    	* Type.java (slice): New.
    	* TypeDecorator.java (slice): New.
    	* TestArray.java (testSlice): New test.
    
    frysk-core/frysk/expr/ChangeLog
    2007-11-21  Teresa Thomas  <tthomas@redhat.com>
    
    	* CExprEvaluator.g (SLICE): New.
    	* CExpr.g: Add grammar for slice operation.
Comment 2 Teresa Thomas 2007-11-26 22:59:35 UTC
Similar feature for pointers:

    Slice operation for pointers. Format - ptr[i:j]
    
    frysk-core/frysk/value/ChangeLog
    2007-11-26  Teresa Thomas  <tthomas@redhat.com>
    
    	* PointerType.java (slice): New.
    	* TestPointer.java (testCharPointerSlice): New test.
Comment 3 Teresa Thomas 2007-11-26 23:12:26 UTC
Slice for arrays/pointers containing null value fails.
Comment 4 Teresa Thomas 2007-11-28 22:07:22 UTC
    Re-write slice for pointers, simplify.
    
    frysk-core/frysk/value/ChangeLog
    2007-11-28  Teresa Thomas  <tthomas@redhat.com>
    
    	* PointerType.java (slice): Re-write.
    	* ArrayType.java (slice): Remove FIX-ME comment.