head 1.5; access; symbols pkgsrc-2015Q3:1.4.0.52 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.50 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.48 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.46 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.44 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.42 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.4.0.40 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.38 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.36 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.34 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.32 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.30 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.28 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.26 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.24 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.22 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.20 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.18 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.16 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.14 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.12 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.10 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.8 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.6 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.4 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.2 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.3.0.26 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.24 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.22 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.20 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.18 pkgsrc-2008Q2-base:1.3 cwrapper-base:1.3 cwrapper:1.3.0.16 pkgsrc-2008Q1:1.3.0.14 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.12 pkgsrc-2007Q4-base:1.3 pkglint-current:1.3 pkgsrc-2007Q3:1.3.0.10 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.8 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.6 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.4 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.2 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.2.0.2 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.1.0.2 pkgsrc-2006Q1-base:1.1; locks; strict; comment @# @; 1.5 date 2015.11.25.13.29.08; author rillig; state dead; branches; next 1.4; commitid wTE9Uc9JWdmhBtKy; 1.4 date 2009.04.26.11.00.17; author rillig; state Exp; branches; next 1.3; 1.3 date 2006.07.27.09.19.37; author rillig; state Exp; branches; next 1.2; 1.2 date 2006.04.11.18.41.50; author rillig; state Exp; branches; next 1.1; 1.1 date 2006.02.26.23.38.07; author rillig; state Exp; branches; next ; desc @@ 1.5 log @Updated pkglint to 5.0 Notable changes include: * The whole code has been rewritten in Go * It is much faster, especially in recursive mode * The code has unit tests, providing examples of use * Some new explanations for existing warnings * Some adjustments to previous warnings @ text @ State machines This chapter explains the various state machines that are used in &pkglint;. It also provides graphical representations of them that are much easier to read than the source code. The opaque arrows in the figures represent transitions that have a regular expression as condition. The hollow arrows are the default transitions if nothing else matches. When multiple regular expressions match in a state, the one that appears first in the source code is chosen. The state machine for shell words The state machine for single shell words is pretty simple, and I think it can be understood from the source code alone. So no graphical representation is provided. The state machine for shell commands
The state transitions for shell commands (Here should be a drawing of the state transitions.)
The punch card symbols provide a means to go to a certain state whenever the input matches the text on the punch card.
The state machine for patch files The state machine for patch files is the newest of the state machines. Here, the state transitions are separated from the code, which makes the code itself pretty small. I don't know yet if this programming style is elegant or not. Time will show.
The state transitions for patch files (Here should be a drawing of the state transitions.)
The states on the left side are for parsing context diffs, the ones on the right side are for unified diffs. Some of the state names are highly abbreviated as follows. The first letter gives the format of the patch, which is c for context diffs and u for unified diffs. The second letter gives the current syntactical level, which is f for a file header, h for a hunk header, or l for the hunk lines. The third letter describes the action that belongs to the line, which is a for an addition, and d for a deletion.
@ 1.4 log @Added tags so the document validates again. @ text @d1 1 a1 1 @ 1.3 log @Fixed a duplicate ID. @ text @d1 1 a1 1 d34 1 a34 1 (Here should be a drawing of the state transitions.) d59 1 a59 1 (Here should be a drawing of the state transitions.) @ 1.2 log @Added an explanation for the state names of the patch file parser. @ text @d1 1 a1 1 d28 1 a28 1
@ 1.1 log @Added the book ``Design and implementation of pkglint''. @ text @d1 1 a1 1 d63 12 @