Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 28c9ae7551b38ef2664a9919a06f4704ab45269c
Ticket: 1306288fffffffffffffffffffffffffffffffff
Tcl_ParseExpr misdocumented and/or misnamed
User & Date: rrh on 2005-09-27 21:56:35
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The function Tcl_ParseExpr does more than do lexical
    and syntactic (parsing) analysis.  It also does some
    semantic analysis, to provide meaning to some lexemes,
    which leads to it detecting faults in plausibly well
    formed expressions.
    
    Thus, parsing 1+0x100000000000000000 (say) will fail,
    since semantic analysis determines that the underlying
    value this represents is bigger than an underlying
    "int" data type.
    
    The man page is silent on this matter, unless you count
    the phrase "...parses Tcl expressions...", and consider
    a Tcl expression to be malformed  if the literal
    numbers don't fit in an "int".
    
    This behaviour of Tcl_ParseExpr makes it
    difficult/impossible to use Tcl_ParseExpr to crack open
    expressions that use the domain of multi-precision
    arithmetic.  Perhaps Tcl 8.5a?,with the introduction of
    mp artithmetic, will clear up some of this?
    
  4. foundin changed to: "obsolete: 8.4.11"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "rrh"
  9. subsystem changed to: "45. Parsing and Eval"
  10. title changed to: "Tcl_ParseExpr misdocumented and/or misnamed"
  11. type changed to: "Bug"