亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? focusparser.pm

?? ACE自適配通信環境(ADAPTIVE Communication Environment)是可以自由使用、開放源碼的面向對象(OO)框架(Framework)
?? PM
?? 第 1 頁 / 共 2 頁
字號:
########################################################################## A Simple Parser for automating the specializations crated in FOCUS.## @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu>## FOCUSParser.pm,v 1.1 2005/09/29 21:31:19 arvindk Exp## This parser, parses the specialization file given as an input argument# and *individually* visits the tags in a pre-determined order to weave# in the specializations.# NOTE: This parser will make N passes over the file, where N equals# to the number of tags defined in the specialization file. This# approach is intentional as it servers current needs. Future versions# may enhance this parser and Visit methods to be more intelligent.###########################################################################package FOCUSParser;# for MY own preferences!use strict;# XML related operationsuse XML::DOM;# Generic file operationsuse FileHandle;# Creating files and renaming themuse File::Copy;# Creating directoriesuse File::Path;############################################# GLOBAL CONSTANTS###########################################my $FOCUS_PREPEND_TAG = "\/\/@@ ";##################################################################### banner: A function that returns the FOCUS banner transformation# for just clarity purpose only.###################################################################sub FOCUS_banner_start{  my $banner_str = "// Code woven by FOCUS:\n";  return $banner_str;}sub FOCUS_banner_end{  my $banner_str = "// END Code woven by FOCUS\n";  return $banner_str;}########################################################################## Visit_ADD: Visit a add element defined in the transform.# In particular look for the hook defined: search it in the source file# and add the data in the <data> tags into the file starting from the# hook, but not including the hook.##########################################################################sub Visit_Add{  my ($add, $copy_file_name) = @_;  # Open the copy and transform it  open (IN, "+<". $copy_file_name) ||    die "cannot open file: " . $copy_file_name;  # To update a file in place, we use the temporary  # file idiom. Perl says this is the best way to  # do this!  my $copy_file_tmp = $copy_file_name . "tmp";  open (OUT, ">". $copy_file_tmp) ||    die "cannot open temporary file for modying file:" . $copy_file_name;  # get the hook element defined in the add element  my $hook = $add->getElementsByTagName ('hook');  # ensure length of hook == 1;  if ($hook->getLength != 1)  {    print "Assertion Error: An <add> element can have only \           one <hook> definition";    # clean up    close (IN);    close (OUT);    # Diagnostic comment    print " [failure]... Reverting changes \n";    unlink ($copy_file_name);    unlink ($copy_file_name . "tmp");    exit (1);  }  # Check if the hook is present in the file at all  my $hook_str = $hook->item(0)->getFirstChild->getNodeValue;  chomp ($hook_str);  #//@@ For now, due to problem with the hook string  my $search_str = $hook_str;  while (<IN>)  {    if (/$search_str/)    {      # Do not remove the hook! It needs to be present      print OUT $_;      # FOCUS banner start      print OUT FOCUS_banner_start;      # parse <data> ... </data> elements for this add tag      my @data_list = $add->getElementsByTagName ('data');      foreach my $data (@data_list)      {	my $data_item = $data->getFirstChild->getNodeValue;	chomp ($data_item);	# Insert the item	print OUT "$data_item \n";      }      # FOCUS banner end      print OUT FOCUS_banner_end;    }    else    {  print OUT $_; }  }  # Everything went well!  close (IN);  close (OUT);  # replace in place the old file with the new one  rename ($copy_file_tmp, $copy_file_name);}############################################################################ Visit_Remove: Visit a <remove> element defined in the transform.# In particular look for the hook defined: search it in the source file# and remove the element's value from the source file being searched.############################################################################sub Visit_Remove{  my ($remove, $copy_file_name) = @_;  # obtain the data to be removed  my $search = $remove->getFirstChild->getNodeValue;  chomp ($search);  # Open the copy and transform it  open (IN, "+<" . $copy_file_name) ||    die "cannot open file: " . $copy_file_name;  # Update the file in place  my $copy_file_name_tmp = $copy_file_name . "tmp";  open (OUT, ">". $copy_file_name_tmp) ||    die "cannot open temporary file for modying file:" . $copy_file_name;;  # Removing something is same as search and replace. Replace with ""  my $replace = "";  foreach my $line (<IN>)  {    if ($line =~/$search/)    {      # We do not print the banner information      # as we have removed something and      # print the banner will be redundant!      # replace <search> with <replace>      $line =~ s/$search/$replace/;      print OUT $line;    }    else { print OUT $line; }  }  # Everything went well!  close (IN);  close (OUT);  # replace in place the old file with the new one  rename ($copy_file_name_tmp, $copy_file_name);}########################################################################## Visit_Substitute: Visit a <substitute> element defined in the transform.# In particular look for the <search> element and replace it with the# <replace> element.#########################################################################sub Visit_Substitute{  my ($substitute, $copy_file_name) = @_;  # Open the copy and transform it  open (IN, "+<". $copy_file_name) ||    die "cannot open file: " . $copy_file_name;  # To update a file in place, we use the temporary  # file idiom. Perl says this is the best way to  # do this!  my $copy_file_name_tmp = $copy_file_name . "tmp";  open (OUT, ">". $copy_file_name . "tmp") ||    die "cannot open temporary file for modying file:" . $copy_file_name;;  # check if the match-line keyword is set or not  my $match_line = $substitute->getAttribute('match-line');  # <search> .... </search>  my $search_list = $substitute->getElementsByTagName ('search');  # ensure length of search == 1;  if ($search_list->getLength != 1 ||      $search_list->getLength == 0)  {    print "Assertion Error: A <substitute> element can have only \          one <search> element";    close (IN);    close (OUT);    # Dianostic comment    print " [failure] reverting changes \n";    unlink ($copy_file_name);    unlink ($copy_file_name_tmp);    exit (1);  }  # <replace> .... </replace>  my $replace_list = $substitute->getElementsByTagName ('replace');  if ($replace_list->getLength != 1 ||      $replace_list->getLength == 0)  {    print "Assertion Error: A <substitute> element can have only \           one <replace> element";    close (IN);    close (OUT);    unlink ($copy_file_name);    unlink ($copy_file_name_tmp);    exit (1);  }  # <search> and <replace> element values  my $search = $search_list->item(0)->getFirstChild->getNodeValue;  my $replace = $replace_list->item(0)->getFirstChild->getNodeValue;  # remove spaces  chomp ($search);  chomp ($replace);  # Search and replace string in the file  foreach my $line (<IN>)  {    # Check if the match line attribute is set. If so then    # ignore word boundaries. If not, honor word boundaries.    my $line_matched = 0;    if (! $match_line)    {      if ($line =~/\b$search\b/)      {        $line_matched = 1;      }    }    else    {      if ($line =~ /$search/)      {        $line_matched = 1;      }    }    # Check if the line matched    if ($line_matched)    {      # FOCUS banner start      print OUT FOCUS_banner_start;      # replace <search> with <replace>      # Caveat: What if <search> occures multiple      # times in the line? Here is how we handle      # it      $line =~ s/$search/$replace/g;      print OUT $line;      # FOCUS banner end      print OUT FOCUS_banner_end;    }    else { print OUT $line; }  }  # everything went well!  close (IN);  close (OUT);  # replace in place the old file with the new one  rename ($copy_file_name_tmp, $copy_file_name);}########################################################################## Visit_Comment: Visit the comment-region hooks defined in the# source code and comment out all code between start and finish of that# region#########################################################################sub Visit_Comment{  my ($comment, $copy_file_name) = @_;  # check for the comment region tags and  # comment out the region  my $start_hook_tag = $comment->getElementsByTagName ('start-hook');  my $end_hook_tag   = $comment->getElementsByTagName ('end-hook');  if ($start_hook_tag->getLength != 1 ||      $end_hook_tag->getLength != 1)  {    print "Assertion Error: A <comment> element can have only \           one pair of <start-hook> and <end-hook> tags";    unlink ($copy_file_name);    exit (1);  }  my $start = $start_hook_tag->item(0)->getFirstChild->getNodeValue;  my $end =   $end_hook_tag->item(0)->getFirstChild->getNodeValue;  # What are we looking for:  # We need to start from "//" . FOCUS_PREPEND_TAG . $hook  # i.e. //[[@ <blah blah>  # This will be the format for both start and end  # //@@ Problems with the hook string  my $start_hook = $FOCUS_PREPEND_TAG . $start;  my $end_hook   = $FOCUS_PREPEND_TAG . $end;  # Open the copy and transform it  open (IN, "+<". $copy_file_name) ||    die "cannot open file: " . $copy_file_name;  my $copy_file_name_tmp = $copy_file_name . "tmp";  open (OUT, ">". $copy_file_name_tmp) ||    die "cannot open temporary file for modying file:" . $copy_file_name;  my $start_commenting = 0;  while (<IN>)  {    if (! /$start_hook/ &&        ! /$end_hook/)    {      if ($start_commenting)      { print OUT "// " . $_; }      else      { print OUT $_; }    }    else    {      if (/$start_hook/)      {        $start_commenting = 1;        print OUT $_; # print start hook!      }      else      {        $start_commenting = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品青草久久| 56国语精品自产拍在线观看| 久久―日本道色综合久久| 久久黄色级2电影| 精品国产1区二区| 国产精品18久久久久久久久久久久 | 91精品国产色综合久久久蜜香臀| 亚洲综合图片区| 666欧美在线视频| 精品一区二区三区免费| 久久久亚洲精品石原莉奈| 国产成人自拍在线| 亚洲人成亚洲人成在线观看图片| 色噜噜狠狠成人中文综合| 亚洲成人www| 精品国产一区二区国模嫣然| 国产福利91精品| 亚洲精品国产成人久久av盗摄| 欧美午夜理伦三级在线观看| 麻豆91精品视频| 国产精品欧美经典| 欧美日韩精品欧美日韩精品一| 奇米888四色在线精品| 国产午夜亚洲精品羞羞网站| 色哟哟精品一区| 男女激情视频一区| 国产精品三级电影| 欧美三级日韩三级| 国产精品一区二区久激情瑜伽| 最新日韩av在线| 欧美一区二区在线免费观看| 国产成人精品影院| 亚洲一区二区三区四区五区黄 | 亚洲午夜视频在线观看| 日韩欧美一卡二卡| av亚洲精华国产精华精华| 五月天中文字幕一区二区| 国产亚洲一区二区三区在线观看 | 老司机精品视频导航| 中文av一区二区| 91麻豆精品国产自产在线| 国产69精品久久久久777| 日韩国产一区二| 国产精品理论片在线观看| 正在播放亚洲一区| 91麻豆免费视频| 国产黄色精品网站| 日本va欧美va精品发布| 一区二区高清免费观看影视大全 | 99re这里只有精品6| 精品在线亚洲视频| 亚洲一区在线观看免费| 国产欧美中文在线| 日韩欧美中文字幕精品| 欧美综合一区二区| av网站一区二区三区| 国产一区二区不卡老阿姨| 视频在线观看91| 樱花草国产18久久久久| 中文字幕二三区不卡| 久久久久久一二三区| 欧美一区二区三区公司| 欧美性xxxxxx少妇| 日本高清不卡视频| 91香蕉视频在线| 北岛玲一区二区三区四区| 国产精品一区专区| 国产自产2019最新不卡| 精彩视频一区二区三区| 激情久久久久久久久久久久久久久久 | 色哟哟欧美精品| jlzzjlzz欧美大全| 成人高清视频在线| 高清不卡在线观看av| 国产成人精品影院| 丰满白嫩尤物一区二区| 粉嫩av一区二区三区在线播放| 国产综合久久久久影院| 国产一区二区免费在线| 国产精品911| 大尺度一区二区| 97精品视频在线观看自产线路二| www.av亚洲| 在线观看国产日韩| 欧美日韩精品一区二区三区四区 | 成人18视频日本| 日本女优在线视频一区二区 | 午夜成人免费电影| 亚洲午夜在线电影| 亚洲v中文字幕| 午夜私人影院久久久久| 日本一区二区成人在线| 亚洲欧美综合在线精品| 日韩欧美精品三级| 欧美午夜精品久久久久久孕妇| 91麻豆免费在线观看| 91麻豆国产香蕉久久精品| 99re成人精品视频| 色就色 综合激情| 91福利社在线观看| 福利一区福利二区| 91网址在线看| 精品视频一区三区九区| 欧美日韩国产一区| 91精品国产欧美日韩| 欧美一区二区不卡视频| 日韩欧美国产午夜精品| 欧美精品一区二区三| 国产精品乱子久久久久| 亚洲欧洲美洲综合色网| 一区二区三区久久| 日韩电影免费在线观看网站| 老司机午夜精品| 成人a免费在线看| 欧美性一二三区| 91精品国产综合久久小美女| 精品国产乱码久久久久久久| 久久久亚洲精品石原莉奈| 亚洲色图19p| 五月天丁香久久| 毛片一区二区三区| 成人天堂资源www在线| 色狠狠综合天天综合综合| 欧美亚洲国产一区在线观看网站| 欧美大度的电影原声| 国产午夜精品久久久久久久 | 欧美一区二区三区婷婷月色| 日韩精品一区二区三区在线观看 | 91在线免费播放| 精品国产乱子伦一区| 国产精品色眯眯| 午夜精品视频一区| 国产一区二区三区精品欧美日韩一区二区三区| 国产成人综合亚洲91猫咪| 91福利精品视频| 精品国产一区二区三区四区四 | 国产999精品久久| 成人蜜臀av电影| 欧美日韩一区二区在线观看| 久久久91精品国产一区二区精品| 亚洲免费伊人电影| 国产一区二区三区免费播放| 在线观看欧美精品| 国产日韩欧美一区二区三区乱码 | 精品国产免费人成在线观看| 亚洲人妖av一区二区| 美腿丝袜在线亚洲一区| 99国产精品久久| 日韩欧美一二三区| 伊人色综合久久天天人手人婷| 美女网站视频久久| 一本一本久久a久久精品综合麻豆| 欧美一级二级在线观看| 亚洲蜜臀av乱码久久精品蜜桃| 日本亚洲视频在线| 欧美日韩高清不卡| 亚洲人成小说网站色在线| 精品一区二区三区在线播放| 欧美日韩在线播放一区| 国产清纯白嫩初高生在线观看91| 视频在线观看国产精品| 欧美日产国产精品| 一区二区三区免费网站| 高清视频一区二区| 久久久久久久精| 美女视频黄久久| 精品美女一区二区三区| 日日摸夜夜添夜夜添国产精品| 92国产精品观看| 国产精品嫩草影院av蜜臀| 国产酒店精品激情| 2020国产成人综合网| 国产成人福利片| 久久婷婷国产综合精品青草| 久久国产精品无码网站| 91精品国产综合久久福利软件| 一区二区视频在线| 久久99国产精品久久| 久久综合国产精品| 国内精品自线一区二区三区视频| 在线不卡一区二区| 日本亚洲天堂网| 欧美日韩你懂的| 卡一卡二国产精品| 日韩欧美国产不卡| 免费在线观看成人| 日韩久久久久久| 国产在线精品一区二区| 中文字幕一区二| 91麻豆国产福利在线观看| 亚洲日本va在线观看| 99国产精品国产精品毛片| 亚洲欧美区自拍先锋| 欧美日韩综合色| 日韩激情在线观看| 欧美一区二区三区免费视频| 久久激情五月激情| 国产亚洲一区二区三区在线观看| 91亚洲国产成人精品一区二区三| 一区二区三区小说|