SLabuz95 / TclToTextFileGenerator

0 stars 0 forks source link

[EDIT Procedure Name Control] Any number of : > 2 used in the begining of procedure name is removed and empty procedure name is used. #34

Closed SLabuz95 closed 2 years ago

SLabuz95 commented 2 years ago

Ex. proc {::::} {} {puts test} : -> return error of unknown : procedure {} -> test :: -> test :::: -> test ::::::::::::::::::::::::::::::-> test {:} -> error {:::} -> test {::::} -> test Note: Reimplement procedure name verification in local config manager.

SLabuz95 commented 2 years ago

Issue renamed after analysis.

SLabuz95 commented 2 years ago

Procedure Name Control

General

  1. Tcl supports procedure for any string. It includes whitespace characters, empty strings.
  2. Tcl Procedure Name can contain namespace sequences.

Details

Tcl namespace

Tcl namespace is sequence of characters ":". The sequence have to contain at least 2 characters. Ex. ::a - global namespace -> Tcl will interpret it as a. ::::::a - global namespace -> Tcl will interpret it as a :a - not a namespace, it's word with ":" and "a" signs :::a::::g - global namespace, namespace a with entity g -> Tcl will interpret it as a::g :::a::::g:::: - global namespace, namespace a with namespace g with entity "" -> Tcl will interpret it as a::g::

Tcl Interpreter implementation

Default output for procedure name and variable name is simplied version of the name. Raw output format use full name.

SLabuz95 commented 2 years ago

Additional comments will be added in future to document this issue.