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

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

?? focusparser.pm

?? ace開發環境 用來開發網絡程序 其運用了設計模式、多平臺、C++等多種知識
?? PM
?? 第 1 頁 / 共 2 頁
字號:
########################################################################## A Simple Parser for automating the specializations crated in FOCUS.## @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu>## $Id: FOCUSParser.pm 68379 2005-09-29 21:34:37Z arvindk $## 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一区二区三区免费野_久草精品视频
一本一道久久a久久精品| 在线电影院国产精品| 国产精品剧情在线亚洲| 欧美高清精品3d| 国产传媒久久文化传媒| 国产精品网曝门| 精品久久久久久久久久久久包黑料| 欧美电影在哪看比较好| 日韩欧美中文字幕制服| 精品日韩在线一区| 日韩一级高清毛片| 久久新电视剧免费观看| 国产亚洲一区二区在线观看| 久久综合国产精品| 国产精品免费视频一区| 亚洲一卡二卡三卡四卡| 日韩国产欧美在线观看| 国产一区二区三区免费播放| 国产91清纯白嫩初高中在线观看| jiyouzz国产精品久久| 91久久一区二区| 欧美一级片在线| 欧美一级欧美一级在线播放| 日本道免费精品一区二区三区| 在线日韩av片| 日韩精品一区二区三区在线播放| 久久影音资源网| 国产精品素人视频| 性欧美疯狂xxxxbbbb| 国产精品综合久久| 色综合久久久久综合| 精品久久久影院| 亚洲乱码国产乱码精品精98午夜| 免费高清视频精品| 处破女av一区二区| 欧美日韩国产小视频| 久久久久久久av麻豆果冻| 亚洲一区二区精品视频| 久久99国产精品久久99果冻传媒| www.色综合.com| 91精品国产麻豆国产自产在线 | 国产精品剧情在线亚洲| 最新中文字幕一区二区三区| 亚洲丰满少妇videoshd| 国产成人夜色高潮福利影视| 欧美视频在线观看一区| 精品国产1区二区| 午夜精品久久久久久久| 成人h精品动漫一区二区三区| 91精品国产综合久久福利软件 | 中文字幕av一区二区三区| 亚洲成人黄色小说| 色域天天综合网| 中文字幕精品在线不卡| 精品亚洲免费视频| 91精品欧美福利在线观看| 亚洲欧洲一区二区在线播放| 久久精子c满五个校花| 欧美哺乳videos| 亚洲va天堂va国产va久| 91视视频在线观看入口直接观看www | 91丨九色丨尤物| 国产欧美日韩亚州综合 | 国产成人亚洲精品狼色在线| 欧美日韩一区二区三区视频| 综合网在线视频| 成人深夜在线观看| 久久精品综合网| 粉嫩嫩av羞羞动漫久久久| 久久久午夜精品| 国产成人综合亚洲网站| 亚洲免费成人av| 粉嫩av一区二区三区在线播放 | 欧美一级二级在线观看| 亚洲女同女同女同女同女同69| 成人激情免费视频| 最新欧美精品一区二区三区| 成人免费不卡视频| 中文字幕中文字幕一区二区| 99re在线精品| 一区二区三区成人| 欧美视频一二三区| 亚洲成人你懂的| 日韩一区二区三区免费看 | 91丨九色丨尤物| 一区二区三区在线免费观看| 欧美日韩美少妇| 麻豆91在线观看| 国产人久久人人人人爽| 91一区二区在线| 天天色 色综合| 亚洲精品一区二区三区蜜桃下载 | 综合久久国产九一剧情麻豆| 色激情天天射综合网| 视频一区国产视频| 亚洲精品一线二线三线无人区| 国产成人免费视频网站| 亚洲精品老司机| 日韩一二在线观看| 成人黄动漫网站免费app| 一区二区高清在线| 欧美大肚乱孕交hd孕妇| 成人激情综合网站| 日韩综合一区二区| 欧美激情一区二区三区| 欧美剧情片在线观看| 成人永久aaa| 日韩和欧美的一区| 欧美国产日本视频| 欧美久久久一区| 欧美精品久久久久久久多人混战| 国产在线观看免费一区| 亚洲图片激情小说| 欧美成人伊人久久综合网| 北条麻妃国产九九精品视频| 日韩中文字幕区一区有砖一区| 欧美激情资源网| 777午夜精品免费视频| 99国内精品久久| 国产一区二区在线观看免费| 亚洲综合成人在线| 中文字幕精品—区二区四季| 日韩写真欧美这视频| 色菇凉天天综合网| 成人免费va视频| 国产高清久久久| 蜜臀国产一区二区三区在线播放| 伊人色综合久久天天| 国产午夜亚洲精品羞羞网站| 欧美一区二区三区影视| 欧美日韩在线直播| 一本久久综合亚洲鲁鲁五月天 | 日本中文字幕一区二区有限公司| 亚洲欧美日韩电影| 国产精品成人免费| 国产性做久久久久久| 日韩免费看的电影| 91精品午夜视频| 91精品国产一区二区三区蜜臀| 欧洲国内综合视频| 欧美影视一区在线| 欧美在线免费视屏| 欧美影片第一页| 欧美伦理电影网| 欧美久久久久免费| 制服丝袜亚洲精品中文字幕| 欧美日韩一区二区三区高清| 91日韩一区二区三区| 色综合天天综合网天天狠天天| av电影在线观看完整版一区二区| 高清日韩电视剧大全免费| 国产精品69毛片高清亚洲| 国产成人av电影免费在线观看| 国产一区二区主播在线| 国产乱人伦偷精品视频不卡| 国产成人亚洲综合a∨婷婷图片 | 欧美伊人精品成人久久综合97| 日本精品免费观看高清观看| 色香蕉久久蜜桃| 欧美色图免费看| 欧美成人精品福利| 国产精品污网站| 亚洲欧美日韩系列| 午夜精品久久久久久久99水蜜桃| 日本中文一区二区三区| 91麻豆精品国产91久久久久久久久| 国产成人精品午夜视频免费| 成人av在线一区二区| 97精品电影院| 91麻豆精品91久久久久久清纯| 日韩一级免费一区| 国产欧美精品国产国产专区| 亚洲伦在线观看| 日本午夜一区二区| 国产乱码精品一品二品| 91免费在线播放| 91精品国产综合久久精品| 2017欧美狠狠色| 最好看的中文字幕久久| 免费成人在线视频观看| 国产精品99久久久久久久vr| 色8久久精品久久久久久蜜| 91麻豆精品国产91久久久 | 亚洲一区二区在线播放相泽| 美国精品在线观看| 99热99精品| 91精品久久久久久久久99蜜臂| 2023国产精品自拍| 夜夜揉揉日日人人青青一国产精品| 六月丁香婷婷色狠狠久久| 99国产精品久久久久久久久久久| 91精品国产入口在线| 中文字幕欧美一| 精品一区二区三区免费观看| 色八戒一区二区三区| 久久久久国色av免费看影院| 亚洲www啪成人一区二区麻豆| 成人免费黄色在线| 日韩午夜中文字幕| 亚洲一区二区视频在线观看|