Documentation Source Text

Check-in [7a0fc411fe]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the opcode documentation generator so that it can handle digits at the end of opcode names.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7a0fc411fea49c6f0840bd24ad393114775cbe9c
User & Date: drh 2015-06-26 18:47:04
Context
2015-06-26
19:15
Make search.tcl more robust in the face of malformed MATCH queries. check-in: 04c0c2b5f2 user: dan tags: trunk
18:47
Fix the opcode documentation generator so that it can handle digits at the end of opcode names. check-in: 7a0fc411fe user: drh tags: trunk
2015-06-20
14:29
Update description of AFL testing. check-in: 73745849d3 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/opcode.in.

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
unset file

# Scan $txt and replace every opcode name with a link to its documentation
#
proc LinkOpcodeNames {txt} {
  global Opcode
  set out {}
  while {[regexp {^(.*?\s)((OP_)?[A-Z][A-Za-z][A-Za-z]+)(.*)$} $txt \
             all pre op opx tail] ||
         [regexp {^(.*?\s)(OP_[A-Z][a-z])([^a-zA-Z_0-9].*)$} $txt \
             all pre op tail]} {
    append out $pre
    regsub {^OP_} $op {} key
    if {[info exists Opcode($key:text)]} {
      append out "<a href=\"#$key\">$key</a>"







|







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
unset file

# Scan $txt and replace every opcode name with a link to its documentation
#
proc LinkOpcodeNames {txt} {
  global Opcode
  set out {}
  while {[regexp {^(.*?\s)((OP_)?[A-Z][A-Za-z][A-Za-z0-9]+)(.*)$} $txt \
             all pre op opx tail] ||
         [regexp {^(.*?\s)(OP_[A-Z][a-z])([^a-zA-Z_0-9].*)$} $txt \
             all pre op tail]} {
    append out $pre
    regsub {^OP_} $op {} key
    if {[info exists Opcode($key:text)]} {
      append out "<a href=\"#$key\">$key</a>"