aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2008-02-15 02:28:57 +0000
committerRalph Amissah <ralph@amissah.com>2008-02-15 02:28:57 +0000
commit2cd369570683630bcabeb1eb55c82cc75fcf015b (patch)
tree4088f99da0c09c9efb22f5ff526ccfe8ac6d6196
parentsisu-0.64.4-1 + md5s (diff)
refinement to semantic tag regex matching
-rw-r--r--CHANGELOG8
-rw-r--r--data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim4
-rw-r--r--lib/sisu/v0/shared_sem.rb15
3 files changed, 19 insertions, 8 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 1c66dfc9..c35925bb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,14 @@ Reverse Chronological:
%% STABLE MANIFEST
+%% sisu_0.64.5.orig.tar.gz (2008-02-15:06/5)
+http://www.jus.uio.no/sisu/pkg/src/sisu_0.64.5.orig.tar.gz
+ sisu_0.64.5.orig.tar.gz
+ sisu_0.64.5-1.dsc
+ sisu_0.64.5-1.diff.gz
+
+ * semantic tag, refinement to regex matching
+
%% sisu_0.64.4.orig.tar.gz (2008-02-14:06/4)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.64.4.orig.tar.gz
2ab102057702aaf35ec96b9a082fb2d9 1488644 sisu_0.64.4.orig.tar.gz
diff --git a/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
index 9a351d88..1de9a34d 100644
--- a/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
+++ b/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
@@ -40,9 +40,9 @@ if !exists("sisu_no_identifiers")
syn match sisu_sem_ex_marker_block "\]:[a-z]\+"
syn match sisu_error_sem_marker "[a-z]\+[:;]{"
syn match sisu_error_sem_marker "}[:;][a-z]\+"
- syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]\+\):{[^}].\{-}}:\1"he=e-1
+ syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]\+\):{[^}].\{-}}:\1"
syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker "\([a-z]\+\);{[^}].\{-}};\1"
- syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]\+\):\[[^}].\{-}\]:\1"he=e-1
+ syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]\+\):\[[^}].\{-}\]:\1"
syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker "\([a-z]\+\);\[[^}].\{-}\];\1"
endif
"% 9 URLs Numbers: and ASCII Codes
diff --git a/lib/sisu/v0/shared_sem.rb b/lib/sisu/v0/shared_sem.rb
index da989999..0c9e485c 100644
--- a/lib/sisu/v0/shared_sem.rb
+++ b/lib/sisu/v0/shared_sem.rb
@@ -65,19 +65,20 @@ module SiSU_sem
@para=para
end
def rgx
+ def exclude
+ /^<:code>/
+ end
def each_csc
- /[a-z]+[:;]\{|\}[:;][a-z]+/
+ /\b[a-z]+[:;]\{|\}[:;][a-z]+\b/
end
def each_c
- /[a-z]+:\{|\}:[a-z]+/
+ /\b[a-z]+:\{|\}:[a-z]+\b/
end
def each_sc
- /[a-z]+;\{|\};[a-z]+/
+ /\b[a-z]+;\{|\};[a-z]+\b/
end
def pair_csc
/(([a-z]+)(?::\{(.+?)\}:\2|;\{(.+?)\};\2))/
- #/(([a-z]+);\{(.+?)\};\2)/
- #/(([a-z]+)([:;])\{(.+?)\}\3\2)/
end
def pair_c
/(([a-z]+):\{(.+?)\}:\2)/
@@ -92,7 +93,9 @@ module SiSU_sem
end
def rm
def sem_marker_parts
- @para.gsub!(rgx.each_csc,'')
+ unless @para =~ rgx.exclude
+ @para.gsub!(rgx.each_csc,'')
+ end
@para
end
def sem_marker_added_extra_parts