Documentation Source Text

Check-in [1477f7f3f4]
Login

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

Overview
Comment:Updates to text bubble generator for Chrome.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1477f7f3f43bded0e3b0af2b54f14f2d2a822968
User & Date: shaneh 2010-03-24 04:03:59.000
Context
2010-03-25
21:30
Added psuedo-BNF generator for syntax diagrams. (check-in: 678b7b774c user: shaneh tags: trunk)
2010-03-24
04:03
Updates to text bubble generator for Chrome. (check-in: 1477f7f3f4 user: shaneh tags: trunk)
03:48
Output of bubble-generator-text.tcl (check-in: cc2f7e8bc8 user: shaneh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to art/syntax/all-text.html.

cannot compute difference between binary files

Changes to art/syntax/bubble-generator-text.tcl.
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# -|
set c9508 "<table class=\"draw\"><tr><td class=\"bottom\"></td><td class=\"lside\"></td></tr><tr><td class=\"empty\"></td><td class=\"lside\"></td></tr></table>"
#->
set rarr  "<table class=\"draw\"><tr><td class=\"bottom\"></td><td rowspan=2 style=\"vertical-align:middle; font-size:$font2;\">&gt;</td></tr><tr><td class=\"empty\"></td></tr></table>"
# <-
set larr  "<table class=\"draw\"><tr><td rowspan=2 style=\"vertical-align:middle; font-size:$font2;\">&lt;</td><td class=\"bottom\"></td></tr><tr><td class=\"empty\"></td></tr></table>"
# ---
set hr  "<table class=\"draw\" width=100%><tr><td class=\"bottom\"></td></tr><tr><td class=\"empty\"></td></tr></table>"


# Draw a bubble containing $txt. 
#
proc draw_bubble {txt} {
  global c9474 c9488 c9484 c9492 c9496 c9581 c9582 c9516 c9584 c9583 c9500 c9508 rarr larr hr

  if {$txt=="nil"} {
    return [list 1 "<table><tr><td width=100%>$hr</td></tr></table>"]
  } elseif {$txt=="bullet"} {
    return [list 1 "<table><tr><td>&otimes;</td></tr></table>"]
  }

  if {[regexp {^/[a-z]} $txt]} {
    set txt [string range $txt 1 end]
    set istoken 1







|








|







447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# -|
set c9508 "<table class=\"draw\"><tr><td class=\"bottom\"></td><td class=\"lside\"></td></tr><tr><td class=\"empty\"></td><td class=\"lside\"></td></tr></table>"
#->
set rarr  "<table class=\"draw\"><tr><td class=\"bottom\"></td><td rowspan=2 style=\"vertical-align:middle; font-size:$font2;\">&gt;</td></tr><tr><td class=\"empty\"></td></tr></table>"
# <-
set larr  "<table class=\"draw\"><tr><td rowspan=2 style=\"vertical-align:middle; font-size:$font2;\">&lt;</td><td class=\"bottom\"></td></tr><tr><td class=\"empty\"></td></tr></table>"
# ---
set hr  "<table class=\"draw\" width=100%><tr><td width=100% class=\"bottom\"></td></tr><tr><td width=100% class=\"empty\"></td></tr></table>"


# Draw a bubble containing $txt. 
#
proc draw_bubble {txt} {
  global c9474 c9488 c9484 c9492 c9496 c9581 c9582 c9516 c9584 c9583 c9500 c9508 rarr larr hr

  if {$txt=="nil"} {
    return [list 1 "<table width=100%><tr><td width=100%>$hr</td></tr></table>"]
  } elseif {$txt=="bullet"} {
    return [list 1 "<table><tr><td>&otimes;</td></tr></table>"]
  }

  if {[regexp {^/[a-z]} $txt]} {
    set txt [string range $txt 1 end]
    set istoken 1
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
      if {$i != $n} {
        set content "<td>$larr</td><td>$tcontent</td>$content"
      } else {
        set content "<td>$tcontent</td>$content"
      }
    }
  }
  set content "<table><tr>$content<td width=100%>$hr</td></tr></table>"

  return [list $h $content]
}

# Draw a sequence of terms from top to bottom.
#
proc draw_stack {indent lx} {







|







540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
      if {$i != $n} {
        set content "<td>$larr</td><td>$tcontent</td>$content"
      } else {
        set content "<td>$tcontent</td>$content"
      }
    }
  }
  set content "<table width=100%><tr>$content<td width=100%>$hr</td></tr></table>"

  return [list $h $content]
}

# Draw a sequence of terms from top to bottom.
#
proc draw_stack {indent lx} {
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
    error "unknown operator: $cmd"
  }

  set h [lindex $rc 0]
  set content [lindex $rc 1]

  if {$draw_hr} {
    set content "<table><tr><td>$content</td><td width=100%>$hr</td></tr></table>"
  } {
    set content "<table><tr><td>$content</td></tr></table>"
  }

  return [list $h $content]
}








|







745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
    error "unknown operator: $cmd"
  }

  set h [lindex $rc 0]
  set content [lindex $rc 1]

  if {$draw_hr} {
    set content "<table width=100%><tr><td>$content</td><td width=100%>$hr</td></tr></table>"
  } {
    set content "<table><tr><td>$content</td></tr></table>"
  }

  return [list $h $content]
}