From f8c029f6c9837d37ca1a668546ea5272bc746fbb Mon Sep 17 00:00:00 2001 From: rillig Date: Tue, 23 May 2006 08:10:37 +0000 Subject: The "future directions" chapter gives a vision of what pkglint may do if I find too much time. --- pkgtools/pkglint/files/doc/Makefile | 3 +- pkgtools/pkglint/files/doc/chap.future.xml | 48 ++++++++++++++++++++++++++++++ pkgtools/pkglint/files/doc/pkglint.xml | 4 ++- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 pkgtools/pkglint/files/doc/chap.future.xml (limited to 'pkgtools') diff --git a/pkgtools/pkglint/files/doc/Makefile b/pkgtools/pkglint/files/doc/Makefile index 3c8a67267a7..d36715f890d 100644 --- a/pkgtools/pkglint/files/doc/Makefile +++ b/pkgtools/pkglint/files/doc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2006/02/27 02:01:04 rillig Exp $ +# $NetBSD: Makefile,v 1.3 2006/05/23 08:10:37 rillig Exp $ # XMLDOCS+= pkglint.xml @@ -7,6 +7,7 @@ XMLDOCS+= chap.defs.xml XMLDOCS+= chap.types.xml XMLDOCS+= chap.code.xml XMLDOCS+= chap.statemachines.xml +XMLDOCS+= chap.future.xml IMAGES+= statemachine.patch.png IMAGES+= statemachine.shellcmd.png diff --git a/pkgtools/pkglint/files/doc/chap.future.xml b/pkgtools/pkglint/files/doc/chap.future.xml new file mode 100644 index 00000000000..8700a4395da --- /dev/null +++ b/pkgtools/pkglint/files/doc/chap.future.xml @@ -0,0 +1,48 @@ + + + +Future directions + + +Tokenizing the input + + For providing more exact diagnostics, it would be nice if + &pkglint; could point the user to the exact character position + of the smallest problematic text in a file. To do this, the + file's contents has to be splitted into tokens. + + Doing this is nontrivial, since the tokenizing scheme + depends on the context in which the tokens are used. For + example, the COMMENT variable may contain + arbitrary characters (including ' and + "), whereas in many other contexts these are + parts of quoted shell words. + + + +Working on abstract syntax trees (AST) + + When the tokenizing above is done, the tokens could be + parsed by a grammar to form abstract syntax trees. These would + consist mainly of function application so that pkglint can infer + types and valid values over these trees. The following functions + are likely to appear. + + + Functions in the abstract syntax trees + + FunctionPurpose + + quote(Val)The :Q modifier + append(Val, Val)The += operator + concat(Val, Val)The direct concatenation of two values + subst(Val, Subst)The :S and :C modifiers + shell(Val)The != operator and the :sh modifier + literal(Val)Introduces literal values + + +
+ +
+ +
diff --git a/pkgtools/pkglint/files/doc/pkglint.xml b/pkgtools/pkglint/files/doc/pkglint.xml index f036b5d3503..f0a1a512668 100644 --- a/pkgtools/pkglint/files/doc/pkglint.xml +++ b/pkgtools/pkglint/files/doc/pkglint.xml @@ -11,9 +11,10 @@ + ]> - + Design and implementation of &pkglint; @@ -32,5 +33,6 @@ &chap.types; &chap.code; &chap.statemachines; +&chap.future; -- cgit v1.2.3