branch : pmacs2
This commit is contained in:
moculus 2009-02-22 22:10:08 +00:00
parent f6c0e57e11
commit 692fc51706
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,8 @@ sub foo {
#@@:heredoc:sql
my $s = <<EOT;
select '<foo attr="3">bar bar</foo>';
--@@:string:xml
select '<foo attr="3">blah blah blah</foo>';
drop table foog;
insert into mytable (col1, col2, "col3") values (99, 33, 1234);
select cast(plunk as timestamp) from blarg join plarg using(id_what) where x = 3;

View File

@ -1,5 +1,5 @@
import mode, tab
from lex import Grammar, PatternRule, NocasePatternRule, RegionRule, NocaseRegionRule
from lex import Grammar, PatternRule, NocasePatternRule, RegionRule, NocaseRegionRule, OverridePatternRule
from mode.python import StringGrammar1, StringGrammar2
class BitStringGrammar(Grammar):
@ -10,6 +10,7 @@ class HexStringGrammar(Grammar):
base_rules = [
PatternRule(r'spaces', r' +'),
OverridePatternRule(r'comment', r'--@@:(?P<token>[.a-zA-Z0-9_]+):(?P<mode>[.a-zA-Z0-9_]+) *$'),
PatternRule(r'comment', r'--.*\n$'),
RegionRule(r'comment', '/\*', Grammar, '\*/'),
PatternRule(r'delimiter', r':=|[():;,\.\$\[\]~]'),