diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2007-03-27 20:35:08 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2007-03-27 20:35:08 +0000 |
commit | a4cb5f61106c72bdfaf2a072e0ce9ad73c1764d7 (patch) | |
tree | c7fe8ca8ef755ceff3fd8baa0474b09a87828f2e /sandbox | |
parent | ecae9f7d5226a941d946b9ce41567c0fe201a1f0 (diff) | |
download | gnome-doc-utils-a4cb5f61106c72bdfaf2a072e0ce9ad73c1764d7.tar.gz |
- Some awks don't understand [[:alpha:]]
* rng/rnc2rng.awk:
- Some awks don't understand [[:alpha:]]
svn path=/trunk/; revision=909
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/mallard/ChangeLog | 5 | ||||
-rw-r--r-- | sandbox/mallard/rng/rnc2rng.awk | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/sandbox/mallard/ChangeLog b/sandbox/mallard/ChangeLog index d9f60b2..d6f054b 100644 --- a/sandbox/mallard/ChangeLog +++ b/sandbox/mallard/ChangeLog @@ -1,6 +1,11 @@ 2007-03-27 Shaun McCance <shaunm@gnome.org> * rng/rnc2rng.awk: + - Some awks don't understand [[:alpha:]] + +2007-03-27 Shaun McCance <shaunm@gnome.org> + + * rng/rnc2rng.awk: - Handle xsd: data types and list constructions 2007-03-15 Shaun McCance <shaunm@gnome.org> diff --git a/sandbox/mallard/rng/rnc2rng.awk b/sandbox/mallard/rng/rnc2rng.awk index d4d7d96..40f8e6e 100644 --- a/sandbox/mallard/rng/rnc2rng.awk +++ b/sandbox/mallard/rng/rnc2rng.awk @@ -131,7 +131,7 @@ function runline (line) { aft = substr(line, 8); sub(/^ */, "", aft); name = aft; - sub(/[^[:alpha:]_]+.*/, "", name); + sub(/[^A-Za-z_]+.*/, "", name); aft = substr(aft, length(name) + 1); stack[++stack_i] = sprintf("<element name=\"%s\">", name); runline(aft); @@ -140,7 +140,7 @@ function runline (line) { aft = substr(line, 10); sub(/^ */, "", aft); name = aft; - sub(/[^[:alpha:]_]+.*/, "", name); + sub(/[^A-Za-z_]+.*/, "", name); aft = substr(aft, length(name) + 1); stack[++stack_i] = sprintf("<attribute name=\"%s\">", name); runline(aft); @@ -151,7 +151,7 @@ function runline (line) { stack[++stack_i] = "<list>"; runline(aft); } - else if (match(line, /^text[^[:alpha:]]/)) { + else if (match(line, /^text[^A-Za-z]/)) { stack[++stack_i] = "<text/>"; runline(substr(line, 5)); } @@ -165,18 +165,18 @@ function runline (line) { error = 1; exit 1 } - else if (match(line, /^xsd:[[:alpha:]_]/)) { + else if (match(line, /^xsd:[A-Za-z_]/)) { name = substr(line, 1); sub(/^xsd:/, "", name); - sub(/[^[:alpha:]_]+.*/, "", name); + sub(/[^A-Za-z_]+.*/, "", name); aft = substr(line, length(name) + 5); stack[++stack_i] = sprintf("<data type=\"%s\" datatypeLibrary=\"http://www.w3.org/2001/XMLSchema-datatypes\"/>", name); runline(aft); } - else if (match(line, /^[[:alpha:]_]/)) { + else if (match(line, /^[A-Za-z_]/)) { name = substr(line, 1); - sub(/[^[:alpha:]_]+.*/, "", name); + sub(/[^A-Za-z_]+.*/, "", name); aft = substr(line, length(name) + 1); stack[++stack_i] = sprintf("<ref name=\"%s\"/>", name); runline(aft); |