示例#1
0
int main()
{
	//词法分析
	LinkQueue hWord=new LinkList;
	hWord->front=hWord->rear=NULL;
    go(hWord);
	disWord(hWord);
	
	//语法分析
	node_ptr head=NULL;
    scanf(head);//读入文法
	node_ptr p=head;
	while(p)//输出文法
	{
		cout<<p->str<<endl;
		p=p->next;
	}
	cout<<endl<<endl;
	system("pause");
    LL(head,hWord);

	//翻译
	TransQueue tr;
	tr.front=tr.rear=NULL;
	node_ptr Ass=NULL;
	translate(hWord,tr);
	DisTrans(tr);
	return 0;
}
示例#2
0
//--------------------------------------------------------------
void defense::draw(){
    ofSetHexColor(0xffffff);
    
    if (CurrentSlide.compare("CaptureSlideJul26")==0) {
        Capture3styles();
        
        
    }
    
    
    if (CurrentSlide.compare("TitleSlide")==0){
        TitleSlide();
    }
    if (CurrentSlide.compare("TableContentSlide")==0){
        TableContentSlide();
    }
    if (CurrentSlide.compare("IntroductionTitle")==0){
        ChapterTitle("INTRODUCTION");
    }
    if (CurrentSlide.compare("DefinitionsSlide")==0){
        DefinitionsSlide();
        
    }
    if (CurrentSlide.compare("JustAnalysis")==0){
        MaxMode =3;
        if(InterMode>MaxMode-1){InterMode=0;}
        JustAnalysis(InterMode);
        
    }
    if (CurrentSlide.compare("BlockDiagram")==0){
        MaxMode =5;
        if(InterMode>MaxMode-1){InterMode=0;}
        BlockDiagram(InterMode);
      }
    if (CurrentSlide.compare("ScopeAndLimitationsSlide")==0){
        ScopeAndLimitationsSlide();
        
    }  
    if (CurrentSlide.compare("ContributionsSlide")==0){
        ContributionsSlide();
        
    }  
    if (CurrentSlide.compare("ReviewTitle")==0){
        ChapterTitle("REVIEW OF A/S IN MEDIA ARTS");
    }  
    if (CurrentSlide.compare("Autotune")==0){
        AutotuneSlide();
    }  
    if (CurrentSlide.compare("Vocoder")==0){
        VocoderSlide();
    }  
    if (CurrentSlide.compare("ImageReview")==0){
        MaxMode =7;
        if(InterMode>MaxMode-1){InterMode=0;}  
        ImageReviewSlides(InterMode);
    } 
    if (CurrentSlide.compare("VideoNPR")==0){
        MaxMode =3;
        if(InterMode>MaxMode-1){InterMode=0;}  
        VideoNPR(InterMode);
    } 
    if (CurrentSlide.compare("VideoReview")==0){
        MaxMode =8;
        if(InterMode>MaxMode-1){InterMode=0;}  
        VideoReviewSlide(InterMode);
    } 
    if (CurrentSlide.compare("MediaArtReview")==0){
        MaxMode =4;
        if(InterMode>MaxMode-1){InterMode=0;}  
        MediaArtReviewSlide(InterMode);
    } 

    if (CurrentSlide.compare("CreativeCodingEra")==0) {
       MaxMode =2;
        if(InterMode>MaxMode-1){InterMode=0;}  
        CreativeCodingEraSlide(InterMode); 
    }
    
    if (CurrentSlide.compare("RedrawingTitle")==0) {
        ChapterTitle("REDRAWING IMAGES");
    }
    if (CurrentSlide.compare("RedrawingRegions")==0) {
        MaxMode =5;
        if(InterMode>MaxMode-1){InterMode=0;} 
        RedrawingRegions(InterMode);
    }
    if (CurrentSlide.compare("EdgesAndLines")==0){
        MaxMode =2;
        if(InterMode>MaxMode-1){InterMode=0;} 
        EdgesAndLines(InterMode);
    }    
    if (CurrentSlide.compare("OrientationSlide")==0) {
        
        Orientation();
    }
    if (CurrentSlide.compare("SizeSlide")==0) {
        SizeSlide();
    }
    if (CurrentSlide.compare("ShapeSlide")==0) {
        ShapeSlide();
    }
    if (CurrentSlide.compare("DensitySlide")==0) {
       DensitySlide();

    } 
    if (CurrentSlide.compare("Connectedness")==0) {
        MaxMode =3;
        if(InterMode>MaxMode-1){InterMode=0;} 
        ConnectednessSlide(InterMode);
    }   
    
    if (CurrentSlide.compare("Transcoding")==0) {
        WaveSlide();
    }  
    
    
    
    if (CurrentSlide.compare("TemporalCoherencyTitle")==0) {
        ChapterTitle("TEMPORAL COHERENCY");
    }
    
    if (CurrentSlide.compare("TemCoherenceContent")==0) {
        TemCoherenceContent();
    }

    if (CurrentSlide.compare("MatchingTitle")==0) {
        AllSubSectionTitles("Matching and Interpolation in the Parameters Domain");
    }
    if (CurrentSlide.compare("TheMatchingProblem")==0) {
        TheMatchingProblem();
    }
    if (CurrentSlide.compare("MinMaxEquation")==0) {
        MinMaxEquation();
    }
    if (CurrentSlide.compare("NCcir")==0)

    {
        NCCirDraw("Example 1: Non-coherent circles");
    }
    
    if(CurrentSlide.compare("MinMaxcir")==0){
           
     NCCirDraw("Minimizing the sum of distances");
    }
    if(CurrentSlide.compare("NCcirMatched")==0){
    NCCirDraw("Random matching");
    }
    if(CurrentSlide.compare("BottleNeckEquation")==0){
        BottleNeckEquation();
    }
    if(CurrentSlide.compare("BottleNeckCir")==0){
        NCCirDraw("Minimizing the maximum distance");
    }
    if (CurrentSlide.compare("DirectionFiltCir")==0){
       NCCirDraw("Penalizing particular directions");
    }
    
    if (CurrentSlide.compare("GradientTitle")==0) {
        AllSubSectionTitles("Gradient Based Approach");
    }
    if (CurrentSlide.compare("GradientBlocks")==0) {
        GradientBlocks();
    }  
    if (CurrentSlide.compare("MeshFlow")==0) {
        MeshFlowDraw();
    } 
    if (CurrentSlide.compare("ArrowsDraw")==0) {
        ArrowsDraw();
    } 
    
    if(CurrentSlide.compare("MobileMirrors")==0){
        ChapterTitle("MOBILE MIRRORS");

    }
    if(CurrentSlide.compare("AngleShift")==0){
        AngleShift();
        
    }
  
    if(CurrentSlide.compare("MeshMobile")==0){
        MeshMobile();
        
    }
    
    if(CurrentSlide.compare("FutureWorkNonCoherent")==0){
        ChapterTitle("FUTURE WORK:\nDENSITY MIRRORS");
        
    }

  
    if(CurrentSlide.compare("FutureWorkMobile")==0){
        ChapterTitle("FUTURE WORK IN\nTEMPORAL COHERENCY");
        
    }
    
//    keyString.push_back("");
//    keyString.push_back("");
//    keyString.push_back("MeshMobile");
//    keyString.push_back("FutureWorkMobile");
    
    
    
    
    if (CurrentSlide.compare("DisTrans")==0) {
        MaxMode =3;
        if(InterMode>MaxMode-1){InterMode=0;} 
        DisTrans(InterMode);
    }
    
    if(CurrentSlide.compare("GradientCircs")==0){
        
         CirclesGradientDraw();
    }
    
    if (CurrentSlide.compare("TargetsTitle")==0) {
        AllSubSectionTitles("Attractors Based Algorithm");
    }
    if (CurrentSlide.compare("TargetsAlgorithm")==0) {
        TargetAlgorithmDraw();
    }
    
    if (CurrentSlide.compare("EllipwithTarget")==0) {
        EllipWithTarget();
    }
    
    if (CurrentSlide.compare("TargetEllipseExample")==0){

        TargetEllipseExample();
        
    }
    
    if (CurrentSlide.compare("GoodFeaturesExample")==0) {

        GoodFeaturesDraw();
    }
    
    if (CurrentSlide.compare("ComparisionTitle")==0) {
        AllSubSectionTitles("Comparison");
    }
    if (CurrentSlide.compare("HistoJumps")==0) {
        Comparisions(0);
    }
    if (CurrentSlide.compare("JerKBar")==0) {
        Comparisions(1);
    }
    if (CurrentSlide.compare("SmoothVsQual")==0) {
        Comparisions(2);
    }
    if (CurrentSlide.compare("Dispersion")==0) {
        Comparisions(3);
    } 
    if (CurrentSlide.compare("CrossSynthesisTitle")==0) {
        ChapterTitle("FUTURE WORK \nAMBIGUOUS IMAGES");
    }
    if (CurrentSlide.compare("CrossContent")==0) {
        CrossContent();
    }
    
    
    if (CurrentSlide.compare("AmbiguousSlide")==0) {
        AmbiguousSlide();
    }
    
    if (CurrentSlide.compare("SubstitutionTitle")==0) {
        AllSubSectionTitles("Substitution");
    }
    if (CurrentSlide.compare("Mixing")==0) {
        MaxMode =3;
        if(InterMode>MaxMode-1){InterMode=0;} 
        MixingImages(InterMode);
    
    }

    if ((CurrentSlide.compare("Bagette")==0)){
    
        BaggeteExample();
    }
    
    if (CurrentSlide.compare("Hormigas")==0) {
        MaxMode =3;
        if(InterMode>MaxMode-1){InterMode=0;} 
        HormigasDraw(InterMode);
    }
    
    if (CurrentSlide.compare("Tree")==0) {
        MaxMode =4;
        if(InterMode>MaxMode-1){InterMode=0;} 
        TreeDraw(InterMode);
    }
    
    if (CurrentSlide.compare("DirectTitle")==0) {
        AllSubSectionTitles("Direct Detection");
    }
    
    
    if (CurrentSlide.compare("TemplateMatching")==0) {
        
        TemplateMatching();
        
    }
    
    if (CurrentSlide.compare("StatesSlide")==0) {
        
         StatesSlide();
        
    }
    
    if (CurrentSlide.compare("TemplateDemo")==0) {
        TemplateDemoDraw();
    }
    if (CurrentSlide.compare("ViterbiSlide")==0) {
        ViterbiSlide();
    }
    if (CurrentSlide.compare("GenerativeTitle")==0) {
        AllSubSectionTitles("Generative Approach");
    }
//    if (CurrentSlide.compare("TreeDemo")==0){
//        TreeDraw();
//    
//    }
    
    if (CurrentSlide.compare("DiscussionSlide")==0){
           ChapterTitle("DISCUSSION");
    }
 
    if (CurrentSlide.compare("ExtensionsSlide")==0){
    
        ExtensionsSlide();
    }
    if (CurrentSlide.compare("FutureSlide")==0){
        
        FutureSlide();
    }

    if (CurrentSlide.compare("QuestionsSlide")==0){
     ChapterTitle("QUESTIONS?");
    }
    
    
    // checkink to save 
    if (booleanforCapture==true) {
        
   //     ofSaveScreen("ParaReNew" + ofToString(FrameNumber) +".png");
   //     FrameNumber++;
//     ofSaveScreen("SuperImagen.png" + ofToString(FrameNumber) + ".png");   
//        booleanforCapture = false;
//        FrameNumber++;
    }
    
    // draw the incoming, the grayscale, the bg and the thresholded difference
//	ofSetHexColor(0xffffff);
//    colorImg = TheInput;
//	colorImg.draw(0,0);
//	grayImage.draw(360,20);


}