IntroductionEBNF is the standard notation for describing the syntax of a formal language: rule after rule, written with great precision — and read like a wall of symbols. In expr = term , { ( ...
简介EBNF 是描述形式语言语法的标准记法:一条条产生式写下来,结构严谨,但对不熟悉的人来说像天书。expr = term , { ( "+" | "-" ) , term } ; 这一行里逗号是连接、{ } 是零次或多次、圆括号是分组、| 是择一,每种记号都对应不同的推导行为。
把文法画成图,规则的层次、循环和...
IntroductionRegular expressions are easy to write and hard to read. What exactly is [a-z0-9-]+\. matching? Which parentheses are groups, and which merely widen the scope of a quantifier? Instead of...
简介正则表达式写出来容易,读起来难。一串 [a-z0-9-]+\. 到底在匹配什么?哪些括号是分组、哪些是量词的作用范围?与其逐字符地推理,不如把它画成”铁路图”(railroad diagram)——每个方框是一个匹配单元,圆角框是可选段,箭头串起整个匹配流程。
PlantUML 内置了 @startregex 引擎,可以直接吃正则并生成铁路图;Mermaid 没有正则图类型,但用流程图的...
简介架构图里出现公式并不罕见:求根公式、折扣公式、SLA 的百分比、队列的期望等待时间。传统做法是把公式写成纯文本(x = (-b +- sqrt(b^2-4ac)) / (2a)),可读性直接归零;另一个极端是把公式截图贴进图里,改一个数字就要重画。
两个引擎都原生支持 LaTeX 风格公式。PlantUML 走 MathJax 路线:用 <math>...</math&...
IntroductionFormulas show up in architecture diagrams more often than you would expect: the quadratic formula, a discount rule, an SLA percentage, the expected wait time of a queue. The usual worka...
简介配置和接口返回值的原文读起来很费劲:一个订单 JSON 展开是十几行缩进,YAML 部署清单更是几十行嵌套。两种引擎各有办法把这种”纯数据”变成结构图——PlantUML 提供 @startjson / @startyaml 原生指令,自动把数据渲染成树;Mermaid 没有内置 JSON 解析,但可以用流程图把层级关系手写出来,反而更灵活。本文用同一份订单 JSON 分别画出...
IntroductionRaw config and API payloads are tedious to read: a single order JSON expands into a dozen indented lines, and a YAML deployment manifest into dozens of nested ones. Both engines have a ...
简介 / IntroductionA network topology diagram is one of the most common artifacts in operations and architecture docs: it shows how servers and links are arranged across the public internet, a D...
简介 / Introduction网络拓扑图是运维与架构文档里最常见的一张图:把公网、DMZ、核心网段的服务器和链路画清楚。本文用同一套「公网 → DMZ → 核心网」的拓扑,分别演示 PlantUML 的 nwdiag 语法和 Mermaid 的 flowchart + subgraph 写法,并逐项对比两者的表达能力。
PlantUML 版PlantUML 内置了 Takes...