diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-11-12 19:33:55 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-11-12 19:33:55 +0000 |
commit | 2325c99d07fa750c1098a3b2bc1bc80fb6bc846a (patch) | |
tree | 3c92fdfb77288af32ad088a425fe2537f4ae3fa8 | |
parent | 3fd2b9d0b6d2bac5e9267fbcf1556f459d7313fe (diff) | |
download | libguestfs-2325c99d07fa750c1098a3b2bc1bc80fb6bc846a.tar.gz libguestfs-2325c99d07fa750c1098a3b2bc1bc80fb6bc846a.tar.xz libguestfs-2325c99d07fa750c1098a3b2bc1bc80fb6bc846a.zip |
todo: Notes on parsing.
-rw-r--r-- | TODO | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -347,3 +347,31 @@ Eric Sandeen pointed out the blktrace tool which is a better way of capturing traces than using patched qemu (see contrib/visualize-alignment). We would still use the same visualization tools in conjunction with blktrace traces. + +guestfish parsing +----------------- + +At the moment guestfish uses an ad hoc parser which has many +shortcomings. We should change to using a lex/yacc-based scanner and +parser (there are better parsers out there, but yacc is sufficient and +very widely available). + +The scanner must deal with the case of parsing a whole command string, +eg. for a command that the user types in: + + ><fs> add-drive-opts "/tmp/foo" readonly:true + +and also with parsing single words from the command line: + + guestfish add-drive-opts /tmp/foo readonly:true + +Note the quotes are for scanning and don't indicate types. + +We should also allow variables and expressions as part of this new +parsing code, eg: + + set roots inspect-os + set product inspect-get-product-name %{roots[0]} + +% is better than $ because of shell escaping and confusion with shell +variables. |