make XML parsing slightly more flexible
--HG-- branch : pmacs2
This commit is contained in:
parent
d95e7d3dda
commit
c439163434
|
@ -20,9 +20,9 @@ class CommentGrammar(Grammar):
|
||||||
rules = [PatternRule('data', '(?:[^-]|-(?!-)|--(?!>))+')]
|
rules = [PatternRule('data', '(?:[^-]|-(?!-)|--(?!>))+')]
|
||||||
class TagGrammar(Grammar):
|
class TagGrammar(Grammar):
|
||||||
rules = [
|
rules = [
|
||||||
PatternRule('attrname', '[a-zA-Z_][a-zA-Z0-9_]+(?==)'),
|
PatternRule('attrname', '[a-zA-Z_][-a-zA-Z0-9_]*(?==)'),
|
||||||
PatternRule('namespace', '[a-zA-Z_]+(?=:)'),
|
PatternRule('namespace', '[a-zA-Z_]+(?=:)'),
|
||||||
PatternRule('name', '[a-zA-Z_][a-zA-Z0-9_]*'),
|
PatternRule('name', '[a-zA-Z_][-a-zA-Z0-9_]*'),
|
||||||
PatternRule('delimiter', '[:/=]'),
|
PatternRule('delimiter', '[:/=]'),
|
||||||
RegionRule('string', '"', StringGrammar1, '"'),
|
RegionRule('string', '"', StringGrammar1, '"'),
|
||||||
RegionRule('string', "'", StringGrammar2, "'"),
|
RegionRule('string', "'", StringGrammar2, "'"),
|
||||||
|
|
Loading…
Reference in New Issue