FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Gestion d'un système client-serveur.
Analyse d'un source - Version 2.1 Emptypar Klaus Ven 17 Mai 2024 - 14:02

» item_index(résolu)
Analyse d'un source - Version 2.1 Emptypar jjn4 Mar 14 Mai 2024 - 19:38

» Bataille terrestre
Analyse d'un source - Version 2.1 Emptypar jjn4 Lun 13 Mai 2024 - 15:01

» SineCube
Analyse d'un source - Version 2.1 Emptypar Marc Sam 11 Mai 2024 - 12:38

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
Analyse d'un source - Version 2.1 Emptypar Marc Sam 11 Mai 2024 - 12:22

» Philharmusique
Analyse d'un source - Version 2.1 Emptypar jjn4 Ven 10 Mai 2024 - 13:58

» PANORAMIC V 1
Analyse d'un source - Version 2.1 Emptypar papydall Jeu 9 Mai 2024 - 3:22

» select intégrés [résolu]
Analyse d'un source - Version 2.1 Emptypar jjn4 Mer 8 Mai 2024 - 17:00

» number_mouse_up
Analyse d'un source - Version 2.1 Emptypar jjn4 Mer 8 Mai 2024 - 11:59

» Aide de PANORAMIC
Analyse d'un source - Version 2.1 Emptypar jjn4 Mer 8 Mai 2024 - 11:16

» trop de fichiers en cours
Analyse d'un source - Version 2.1 Emptypar lepetitmarocain Mer 8 Mai 2024 - 10:43

» Je teste PANORAMIC V 1 beta 1
Analyse d'un source - Version 2.1 Emptypar papydall Mer 8 Mai 2024 - 4:17

» bouton dans autre form que 0(résolu)
Analyse d'un source - Version 2.1 Emptypar leclode Lun 6 Mai 2024 - 13:59

» KGF_dll - nouvelles versions
Analyse d'un source - Version 2.1 Emptypar Klaus Lun 6 Mai 2024 - 11:41

» @Jack
Analyse d'un source - Version 2.1 Emptypar Jack Mar 30 Avr 2024 - 20:40

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier
Le Deal du moment : -28%
Précommande : Smartphone Google Pixel 8a 5G ...
Voir le deal
389 €
-45%
Le deal à ne pas rater :
PC Portable LG Gram 17″ Intel Evo Core i7 32 Go /1 To
1099.99 € 1999.99 €
Voir le deal

 

 Analyse d'un source - Version 2.1

Aller en bas 
4 participants
AuteurMessage
Marc

Marc


Nombre de messages : 2397
Age : 63
Localisation : TOURS (37)
Date d'inscription : 17/03/2014

Analyse d'un source - Version 2.1 Empty
MessageSujet: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyDim 24 Déc 2017 - 12:49

Bonjour à tous !

Voici la version 2.1 de mon programme d’analyse d’un source.
Bien plus performant, non pas en rapidité, mais en discrimination des mots clés.
J’y ai intégré la fonction de recherche et une fonction de sauvegarde.
L’analyse peut être sauvegardée sous un nom de fichier qui prendra automatiquement l’extension .SAV
Lors de la sauvegarde, le programme crée également un sous répertoire du même nom que la sauvegarde, incluant les fichiers .TXT de l’analyse. On peut donc les imprimer individuellement pour travailler dessus.

On peut recharger une sauvegarde (fichier .sav), ce qui permet de retrouver tous les écrans d’analyse instantanément sans attendre une nouvelle analyse.

Le bouton Integral affiche la totalité du code source à analyser.

Le bouton LABEL affiche les structures LABEL - GOSUB - RETURN
Le bouton + LABEL classe les LABELs par ordre alphabétique avec leurs numéros de ligne.

Le bouton SUB affiche les structures SUB - EXIT_SUB - END_SUB - FNC - RESULT - END_FNC
Le bouton + SUB classe les SUB et les FNC ordre alphabétique avec leurs numéros de ligne.

Le bouton DIM affiche les structures DIM - DIM_LOCAL - FREE
Le bouton + DIM classe les DIMs par ordre alphabétique avec leurs numéros de ligne.

Le bouton IF affiche les structures IF - THEN - ELSE - END_IF

Le bouton FOR affiche les structures FOR - TO - STEP - EXIT_FOR - NEXT

Le bouton WHILE affiche les structures WHILE - EXIT_WHILE - END_WHILE - REPEAT - EXIT_REPEAT - UNTIL

Le bouton SELECT affiche les structures SELECT - CASE - END_SELECT

Code:
' ------------------------------------------------------------------------------
'  PANORAMIC FILE ANALYSER Version 2.1
'  MARC37 - February 2018 - Panoramic v0.9.28.i13
'  http://panoramic-language.pagesperso-orange.fr/French/index.html
'  http://panoramic.forumotion.com
' ------------------------------------------------------------------------------
DIM a$
DIM b$ : ' Reading a line of BasicFileToAnalyse$
DIM c$ : ' uppercase of b$
DIM d$ : ' formatted line number as ######
DIM BasicFileToAnalyse$
DIM AlreadyExistingLine%
DIM i%, j% : ' variable loop FOR/NEXT
DIM k%, l%, f%
DIM LineLength%
DIM LineNumber%, FontSize%, MemoInUse%
DIM StartingLinePosition%
DIM Character$
DIM Word$, UpperWord$, LastWordDisplay$
DIM Line$
DIM z$
LABEL Resize, OpenFile, Bigger, Smaller, About, Save, Quit
LABEL Integral, AllLabel, AllSub, AllIf, AllDim, AllForNext, AllWhile, AllSelect, FindText, DataEntry, StringSearch
LABEL AllLabelMore, AllSubMore, AllDimMore
FontSize% = 10
DLIST 50 : ' hiden object => code source to analyze
DLIST 51 : ' hidden object => list of LABEL
DLIST 52 : ' hidden object => Source code Upper No Quotes
Mask()
ON_CLOSE 0, Quit
ON_RESIZE 0, Resize
ON_CLICK 1, OpenFile
ON_CLICK 2, Quit
ON_CLICK 3, About
ON_CLICK 4, Save
ON_CLICK 5, Integral
ON_CLICK 6, AllLabel
ON_CLICK 7, AllLabelMore
ON_CLICK 8, AllSub
ON_CLICK 9, AllSubMore
ON_CLICK 10, AllDim
ON_CLICK 11, AllDimMore
ON_CLICK 12, AllIf
ON_CLICK 13, AllForNext
ON_CLICK 14, ALLWhile
ON_CLICK 15, AllSelect
ON_CLICK 16, Smaller
ON_CLICK 17, Bigger
ON_CLiCK 18, FindText
END
' ------------------------------------------------------------------------------
FindText:
    OFF_CLICK 18
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 31
    MemoInUse% = 31
    IF TEXT$(18)="  >> Search >>" THEN TEXT 18,""        
    Word$=TEXT$(18)
    DISPLAY
    GOSUB StringSearch
RETURN
' ------------------------------------------------------------------------------
DataEntry:
    Word$=TEXT$(18)
    GOSUB StringSearch
RETURN
' ------------------------------------------------------------------------------
StringSearch:
    UpperWord$ = UPPER$(Word$)
    CLEAR 31
    WaitingMessage()
    DISPLAY
    FOR LineNumber% = 1 to COUNT(50)
        IF Word$=""
                b$=ITEM_READ$(20,LineNumber%)
            ITEM_ADD 31,b$
        ELSE    
            b$=UPPER$(ITEM_READ$(50,LineNumber%))
            IF INSTR(b$,UpperWord$)>0
                b$=ITEM_READ$(20,LineNumber%)
                ITEM_ADD 31,b$
            END_IF
        END_IF        
        ON_CHANGE 18, DataEntry
    NEXT LineNumber%
    HIDE 100
RETURN
' ------------------------------------------------------------------------------
OpenFile:
    IF OBJECT_EXISTS(40)=0 THEN OPEN_DIALOG 40
    FILTER 40,"*.bas, *.sav|*.bas;*.sav"
    BasicFileToAnalyse$=FILE_NAME$(40)
    IF BasicFileToAnalyse$="_" THEN RETURN
    CAPTION 0, BasicFileToAnalyse$
    CLEAR 50
    CLEAR 51
    CLEAR 52
    FOR i% = 20 TO 31
        CLEAR i%
    NEXT i%    
    IF RIGHT$(BasicFileToAnalyse$,4)= ".sav"
        BasicFileToAnalyse$ = LEFT$(BasicFileToAnalyse$,LEN(BasicFileToAnalyse$)-4)
        IF DIR_EXISTS(BasicFileToAnalyse$+"_txt")= 0 THEN DIR_MAKE BasicFileToAnalyse$+"_txt"
        ARCHIVER_ON
            ARCHIVER_EXTRACT BasicFileToAnalyse$+".sav",BasicFileToAnalyse$+"_txt"
        ARCHIVER_OFF
        FILE_LOAD 50,BasicFileToAnalyse$+"_txt\Source.txt"
        FOR i%=20 TO 31
        SELECT i%
            CASE 20 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\Integral.txt"
            CASE 21 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\Label.txt"
            CASE 22 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\Sub.txt"
            CASE 23 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\Dim.txt"
            CASE 24 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\If.txt"
            CASE 25 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\For.txt"
            CASE 26 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\While.txt"
            CASE 27 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\Select.txt"
            CASE 28 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\LabelMore.txt"
            CASE 29 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\SubMore.txt"
            CASE 30 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\DimMore.txt"
            CASE 31 : FILE_LOAD i%,BasicFileToAnalyse$+"_txt\Search.txt"
        END_SELECT
        NEXT i%
        TEXT 18, "  >> Search >>"  
        FOR i% = 4 TO 18
            SHOW i%
        NEXT i%
        RETURN
    END_IF
    FOR i% = 4 TO 18
        HIDE i%
    NEXT i%
    OFF_RESIZE 0
    OFF_CLICK 1
    OFF_CHANGE 18
    ON_CLiCK 18, FindText
    LineNumber% = 1
    FOR i% = 21 to 32
        HIDE i%
    NEXT i%
    SHOW 20
    TEXT 18, "  >> Search >>"  
    WaitingMessage()
    FILE_OPEN_READ 40,BasicFileToAnalyse$
    WHILE FILE_EOF(40)<>1
        b$=FILE_READLN$(40)
        d$=STR$(LineNumber%)
        WHILE LEN(d$)<6
            d$=" "+d$
        END_WHILE
        c$=UPPER$(b$)
        QuoteFilter()
        ITEM_ADD 50, b$
        ITEM_ADD 20, d$+" "+b$
        LineNumber% = LineNumber% + 1
    END_WHILE
    FILE_CLOSE 40
    Analyse()
    HIDE 100
    ON_RESIZE 0, Resize
    ON_CLICK 1, OpenFile
RETURN
' ------------------------------------------------------------------------------
SUB QuoteFilter()
    DIM_LOCAL DoubleQuote%
    LineLength% = LEN(c$)
    IF LineLength% = 0
        ITEM_ADD 52,""
        EXIT_SUB
    END_IF
    IF INSTR(c$,"REM ")>0
        IF INSTR(c$,"REM ")=1 OR INSTR(c$," REM ")>0 OR INSTR(c$,":REM ")>0
            c$= LEFT$(b$,INSTR(c$,"REM"))
            ITEM_ADD 52, c$
            EXIT_SUB
        END_IF    
    END_IF
    IF LineLength% > 0
        DoubleQuote% = 0
        Line$=""
        FOR i% = 1 to LineLength%
            Character$=MID$(c$,i%,1)
            IF Character$ = CHR$(39) AND DoubleQuote% = 0
                ITEM_ADD 52, Line$
                EXIT_SUB
            END_IF
            IF Character$ = CHR$(34) THEN DoubleQuote% = DoubleQuote% + 1
            IF DoubleQuote% = 1 THEN Character$ = "x"
            IF DoubleQuote% = 2 THEN DoubleQuote% = 0    
            Line$ = Line$ + Character$
        NEXT i%
        ITEM_ADD 52, Line$
    END_IF    
END_SUB
' ------------------------------------------------------------------------------
SUB Analyse()
    IF COUNT(50) = 0
        HIDE 100
        IF MESSAGE_WARNING_OK("This file is empty !")=1 THEN EXIT_SUB
    END_IF
    ExtractingLabelNames()
    FOR LineNumber% = 1 to COUNT(50)
        AlreadyExistingLine% = 0
        b$=ITEM_READ$(50,LineNumber%)
        c$=ITEM_READ$(52,LineNumber%)
        LineLength% = LEN(c$)
        d$=STR$(LineNumber%)
        WHILE LEN(d$)<6
            d$=" "+d$
        END_WHILE
        DisplayLabel()
        DisplaySub()
        DisplayIf()
        DisplayDim()
        DisplayFor()
        DisplayWhile()
        DisplaySelect()
    NEXT LineNumber%
    ITEM_ADD 28, "                   Number of LABEL(s) : .................. "+STR$(COUNT(28))
    ITEM_ADD 29, "                   Number of SUB / FNC : .................. "+STR$(COUNT(29))
    ITEM_ADD 30, "                   Number of DIM(s) : ................ "+STR$(COUNT(30))
    FOR i% = 4 TO 18
        SHOW i%
    NEXT i%
END_SUB
' ------------------------------------------------------------------------------
SUB ExtractingLabelNames()
    FOR LineNumber% = 1 to COUNT(50)
        b$=ITEM_READ$(50,LineNumber%)
        c$=ITEM_READ$(52,LineNumber%)
        IF INSTR(c$,"LABEL ")>0
            IF INSTR(c$,"LABEL ")=1 OR INSTR(c$," LABEL ")>0 OR INSTR(c$,":LABEL ")>0
                StartingLinePosition% = INSTR(c$,"LABEL ")+6
                LineLength%=LEN(b$)
                Word$ = ""
                FOR j% = StartingLinePosition% TO LineLength%
                    Character$=MID$(b$,j%,1)
                    IF ASC(Character$) = 58
                        Word$=Word$+":"
                        ITEM_ADD 51, Word$
                        Word$ = ""
                        EXIT_FOR
                    END_IF
                    IF ASC(Character$)>47
                        Word$ = Word$ + Character$
                    END_IF
                    IF j% = LineLength% OR ASC(Character$) = 32 OR ASC(Character$) = 44
                        IF ASC(Word$) > 47
                            Word$=Word$+":"
                            ITEM_ADD 51, Word$
                            Word$ = ""
                        END_IF    
                    END_IF    
                NEXT j%
            END_IF    
        END_IF
    NEXT LineNumber%
END_SUB
' ------------------------------------------------------------------------------
SUB DisplayLabel()
    IF INSTR(c$,"LABEL ")>0
        IF INSTR(c$,"LABEL ")=1 OR INSTR(c$," LABEL ")>0 OR INSTR(c$,":LABEL ")>0
            ITEM_ADD 21, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"GOSUB ")>0
        IF INSTR(c$,"GOSUB ")=1 OR INSTR(c$," GOSUB ")>0 OR INSTR(c$,":GOSUB ")>0
           ITEM_ADD 21, d$+" "+b$
           AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF AlreadyExistingLine% = 0 and COUNT(51) > 0
        FOR i% = 1 to COUNT(51)
            Word$ = ITEM_READ$(51,i%)
            UpperWord$=UPPER$(Word$)
            IF INSTR(c$,UpperWord$)>0
                j% = INSTR(c$,UpperWord$)
                IF INSTR(c$,UpperWord$)=1
                    ITEM_ADD 21,""
                    ITEM_ADD 21, d$+" "+b$
                    ITEM_ADD 28, "      " + Word$ + " "+ STRING$(70-len(Word$),".")+ d$
                    AlreadyExistingLine% = 1
                END_IF
                IF J%>1
                    IF MID$(b$,j%-1,1)= CHR$(32) OR MID$(b$,j%-1,1)= CHR$(58)
                        ITEM_ADD 21,""
                        ITEM_ADD 21, d$+" "+b$
                        ITEM_ADD 28, "      " + Word$ + " "+ STRING$(70-len(Word$),".")+ d$
                        AlreadyExistingLine% = 1
                    END_IF    
                END_IF    
            END_IF    
        NEXT i%
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"RETURN")>0
        IF INSTR(c$,"RETURN ")=1 OR INSTR(c$,"RETURN:")=1 OR INSTR(c$," RETURN ")>0 OR INSTR(c$,":RETURN ")>0 OR INSTR(c$,":RETURN:")> 0 OR INSTR(c$," RETURN:")> 0 OR INSTR(c$," RETURN") = (LineLength%-6) OR INSTR(c$,":RETURN") = (LineLength%-6)
            ITEM_ADD 21, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF
    END_IF
END_SUB
' ------------------------------------------------------------------------------
SUB DisplaySub()
    IF INSTR(c$,"SUB ")>0
        IF INSTR(c$,"SUB ")=1 OR INSTR(c$," SUB ")>0 OR INSTR(c$,":SUB ")>0
            ITEM_ADD 22, d$+" "+b$
            ITEM_ADD 29, "      " + b$ + " "+ STRING$(70-len(b$),".")+ d$
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"EXIT_SUB")>0
        IF INSTR(c$,"EXIT_SUB ")=1 OR INSTR(c$,"EXIT_SUB:")=1 OR INSTR(c$," EXIT_SUB ")>0 OR INSTR(c$,":EXIT_SUB ")>0 OR INSTR(c$,":EXIT_SUB:")> 0 OR INSTR(c$," EXIT_SUB:")> 0 OR INSTR(c$," EXIT_SUB") = (LineLength%-8) OR INSTR(c$,":EXIT_SUB") = (LineLength%-8)
            ITEM_ADD 22, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"END_SUB")>0
        IF INSTR(c$,"END_SUB ")=1 OR INSTR(c$,"END_SUB:")=1 OR INSTR(c$," END_SUB ")>0 OR INSTR(c$,":END_SUB ")>0 OR INSTR(c$,":END_SUB:")> 0 OR INSTR(c$," END_SUB:")> 0 OR INSTR(c$," END_SUB") = (LineLength%-7) OR INSTR(c$,":END_SUB") = (LineLength%-7)
            ITEM_ADD 22, d$+" "+b$
            ITEM_ADD 22, ""
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF INSTR(c$,"FNC ")>0
        IF INSTR(c$,"FNC ")=1 OR INSTR(c$," FNC ")>0 OR INSTR(c$,":FNC ")>0
            ITEM_ADD 22, d$+" "+b$
            ITEM_ADD 29, "      " + b$ + " "+ STRING$(70-len(b$),".")+ d$
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"RESULT")>0
        IF INSTR(c$,"RESULT ")=1 OR INSTR(c$," RESULT ")>0 OR INSTR(c$,":RESULT ")>0
            ITEM_ADD 22, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"END_FNC")>0
        IF INSTR(c$,"END_FNC ")=1 OR INSTR(c$,"END_FNC:")=1 OR INSTR(c$," END_FNC ")>0 OR INSTR(c$,":END_FNC ")>0 OR INSTR(c$,":END_FNC:")> 0 OR INSTR(c$," END_FNC:")> 0 OR INSTR(c$," END_FNC") = (LineLength%-7) OR INSTR(c$,":END_FNC") = (LineLength%-7)
            ITEM_ADD 22, d$+" "+b$
            ITEM_ADD 22, ""
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    
END_SUB
' ------------------------------------------------------------------------------
SUB DisplayIf()
    z$=" THEN "
    IF INSTR(c$,"IF ")>0  
        IF INSTR(c$,"IF ")=1 OR INSTR(c$," IF ")>0 OR INSTR(c$,":IF ")>0
            ITEM_ADD 24, d$+" "+b$
            IF INSTR(c$,z$)>0 THEN ITEM_ADD 24,""
            AlreadyExistingLine%=1
            LastWordDisplay$="IF"
        END_IF    
    END_IF
    IF AlreadyExistingLine%=0
        IF INSTR(c$,z$)>0
            ITEM_ADD 24, d$+" "+b$
            ITEM_ADD 24,"" : beep
            AlreadyExistingLine%=1
            LastWordDisplay$=z$
        END_IF
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"ELSE")>0
        IF INSTR(c$,"ELSE ")=1 OR INSTR(c$,"ELSE:")=1 OR INSTR(c$," ELSE ")>0 OR INSTR(c$,":ELSE ")>0 OR INSTR(c$,":ELSE:")> 0 OR INSTR(c$," ELSE:")> 0 OR INSTR(c$," ELSE") = (LineLength%-4) OR INSTR(c$,":ELSE") = (LineLength%-4)
            ITEM_ADD 24, d$+" "+b$
            AlreadyExistingLine%=1
            LastWordDisplay$="ELSE"
        END_IF
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"END_IF")>0
        IF INSTR(c$,"END_IF ")=1 OR INSTR(c$,"END_IF:")=1 OR INSTR(c$," END_IF ")>0 OR INSTR(c$,":END_IF ")>0 OR INSTR(c$,":END_IF:")> 0 OR INSTR(c$," END_IF:")> 0 OR INSTR(c$," END_IF") = (LineLength%-6) OR INSTR(c$,":END_IF") = (LineLength%-6)
            ITEM_ADD 24, d$+" "+b$
            LastWordDisplay$="END_IF"
            AlreadyExistingLine%=1
        END_IF    
    END_IF
END_SUB
' ------------------------------------------------------------------------------
SUB DisplayDim()
    IF INSTR(c$,"DIM ")>0
        IF INSTR(c$,"DIM ")=1 OR INSTR(c$," DIM ")>0 OR INSTR(c$,":DIM ")>0
            k% = 4
            ITEM_ADD 23, d$+" "+b$
            DisplayDimMore()
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF INSTR(c$,"DIM_LOCAL ")>0
        IF INSTR(c$,"DIM_LOCAL ")=1 OR INSTR(c$," DIM_LOCAL ")>0 OR INSTR(c$,":DIM_LOCAL ")>0
            k% = 10
            ITEM_ADD 23, d$+" "+b$
            DisplayDimMore()
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF INSTR(c$,"FREE ")>0
        IF INSTR(c$,"FREE ")=1 OR INSTR(c$," FREE ")>0 OR INSTR(c$,":FREE ")>0
            ITEM_ADD 23, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF    
    END_IF      
END_SUB
' ------------------------------------------------------------------------------
SUB DisplayDimMore()
    IF k% = 4 THEN StartingLinePosition% = INSTR(c$,"DIM ")+4
    IF k% = 10 THEN StartingLinePosition% = INSTR(c$,"DIM_LOCAL ")+10
    LineLength%=LEN(b$)
    Word$ = ""
    f% = 0
    FOR j% = StartingLinePosition% TO LineLength%
        Character$=MID$(b$,j%,1)
        IF ASC(Character$)=40 THEN f%=1
        IF ASC(Character$)=41 THEN f%=0
        IF ASC(Character$)=44 AND f%=0 AND Word$<>""
            IF k% = 4 THEN ITEM_ADD 30, "       " + Word$ + " " + STRING$(70-len(Word$),".")+d$+" DIM"
            IF k% = 10 THEN ITEM_ADD 30, "       " + Word$ + " " + STRING$(70-len(Word$),".")+d$+" DIM_LOCAL"
            Word$ = ""
        END_IF
        IF ASC(Character$)<>44 AND ASC(Character$)<>58 AND ASC(Character$)>35 THEN Word$ = Word$ + Character$
        IF ASC(Character$)=44 AND f%=1 THEN Word$ = Word$ + Character$
        IF ASC(Character$)=58 OR j% = LineLength%
            IF Word$<>""
                IF k% = 4 THEN ITEM_ADD 30, "       " + Word$ + " " + STRING$(70-len(Word$),".")+d$+" DIM"
                IF k% = 10 THEN ITEM_ADD 30, "       " + Word$ + " " + STRING$(70-len(Word$),".")+d$+" DIM_LOCAL"
            END_IF
            Word$ = ""
            EXIT_FOR
        END_IF      
    NEXT j%
END_SUB
' ------------------------------------------------------------------------------
SUB DisplayFor()
    IF INSTR(c$,"FOR ")>0
        IF INSTR(c$,"FOR ")=1 OR INSTR(c$," FOR ")>0 OR INSTR(c$,":FOR ")>0
            ITEM_ADD 25, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$," TO ")>0 THEN ITEM_ADD 25, d$+" "+b$ : AlreadyExistingLine%=1
    IF AlreadyExistingLine%=0 AND INSTR(c$," STEP ")>0 THEN ITEM_ADD 25, d$+" "+b$ : AlreadyExistingLine%=1
    IF AlreadyExistingLine%=0 AND INSTR(c$,"EXIT_FOR")>0
        IF INSTR(c$,"EXIT_FOR ")=1 OR INSTR(c$,"EXIT_FOR:")=1 OR INSTR(c$," EXIT_FOR ")>0 OR INSTR(c$,":EXIT_FOR ")>0 OR INSTR(c$,":EXIT_FOR:")> 0 OR INSTR(c$," EXIT_FOR:")> 0 OR INSTR(c$," EXIT_FOR") = (LineLength%-8) OR INSTR(c$,":EXIT_FOR") = (LineLength%-8)
            ITEM_ADD 25, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"NEXT ")>0
        IF INSTR(c$,"NEXT ")=1 OR INSTR(c$," NEXT ")>0 OR INSTR(c$,":NEXT ")>0
            ITEM_ADD 25, d$+" "+b$
            ITEM_ADD 25,""
            AlreadyExistingLine%=1
        END_IF
    END_IF    
END_SUB
' ------------------------------------------------------------------------------
SUB DisplayWhile()
    IF INSTR(c$,"WHILE ")>0
        IF INSTR(c$,"WHILE ")=1 OR INSTR(c$," WHILE ")>0 OR INSTR(c$,":WHILE ")>0
            ITEM_ADD 26, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF INSTR(c$,"REPEAT")>0
        IF INSTR(c$,"REPEAT ")=1 OR INSTR(c$,"REPEAT:")=1 OR INSTR(c$," REPEAT ")>0 OR INSTR(c$,":REPEAT ")>0 OR INSTR(c$,":REPEAT:")> 0 OR INSTR(c$," REPEAT:")> 0 OR INSTR(c$," REPEAT") = (LineLength%-6) OR INSTR(c$,":REPEAT") = (LineLength%-6)
            ITEM_ADD 26, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"EXIT_WHILE")>0
        IF INSTR(c$,"EXIT_WHILE ")=1 OR INSTR(c$,"EXIT_WHILE:")=1 OR INSTR(c$," EXIT_WHILE ")>0 OR INSTR(c$,":EXIT_WHILE ")>0 OR INSTR(c$,":EXIT_WHILE:")> 0 OR INSTR(c$," EXIT_WHILE:")> 0 OR INSTR(c$," EXIT_WHILE") = (LineLength%-10) OR INSTR(c$,":EXIT_WHILE") = (LineLength%-10)
            ITEM_ADD 26, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"EXIT_REPEAT")>0
        IF INSTR(c$,"EXIT_REPEAT ")=1 OR INSTR(c$,"EXIT_REPEAT:")=1 OR INSTR(c$," EXIT_REPEAT ")>0 OR INSTR(c$,":EXIT_REPEAT ")>0 OR INSTR(c$,":EXIT_REPEAT:")> 0 OR INSTR(c$," EXIT_REPEAT:")> 0 OR INSTR(c$," EXIT_REPEAT") = (LineLength%-11) OR INSTR(c$,":EXIT_REPEAT") = (LineLength%-11)
            ITEM_ADD 26, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"END_WHILE")>0
        IF INSTR(c$,"END_WHILE ")=1 OR INSTR(c$,"END_WHILE:")=1 OR INSTR(c$," END_WHILE ")>0 OR INSTR(c$,":END_WHILE ")>0 OR INSTR(c$,":END_WHILE:")> 0 OR INSTR(c$," END_WHILE:")> 0 OR INSTR(c$," END_WHILE") = (LineLength%-9) OR INSTR(c$,":END_WHILE") = (LineLength%-9)
            ITEM_ADD 26, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"UNTIL")>0
        IF INSTR(c$,"UNTIL ")=1 OR INSTR(c$," UNTIL ")>0 OR INSTR(c$,":UNTIL ")>0
            ITEM_ADD 26, d$+" "+b$
            ITEM_ADD 26, ""
            AlreadyExistingLine%=1
        END_IF    
    END_IF
END_SUB
' ------------------------------------------------------------------------------
SUB DisplaySelect()
    IF INSTR(c$,"SELECT ")>0
       IF INSTR(c$,"SELECT ")=1 OR INSTR(c$," SELECT ")>0 OR INSTR(c$,":SELECT ")>0
            ITEM_ADD 27, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF INSTR(c$,"CASE ")>0
        IF INSTR(c$,"CASE ")=1 OR INSTR(c$," CASE ")>0 OR INSTR(c$,":CASE ")>0
            ITEM_ADD 27, d$+" "+b$
            AlreadyExistingLine%=1
        END_IF    
    END_IF
    IF AlreadyExistingLine%=0 AND INSTR(c$,"END_SELECT")>0
        IF INSTR(c$,"END_SELECT ")=1 OR INSTR(c$,"END_SELECT:")=1 OR INSTR(c$," END_SELECT ")>0 OR INSTR(c$,":END_SELECT ")>0 OR INSTR(c$,":END_SELECT:")> 0 OR INSTR(c$," END_SELECT:")> 0 OR INSTR(c$," END_SELECT") = (LineLength%-10) OR INSTR(c$,":END_SELECT") = (LineLength%-10)
            ITEM_ADD 27, d$+" "+b$
            ITEM_ADD 27, ""
            AlreadyExistingLine%=1
        END_IF    
    END_IF
END_SUB
' ------------------------------------------------------------------------------
Integral:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 20
    MemoInUse% = 20
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllLabel:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 21
    MemoInUse% = 21
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllSub:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 22
    MemoInUse% = 22
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllIf:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 24
    MemoInUse% = 24
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllDim:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 23
    MemoInUse% = 23
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllForNext:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 25
    MemoInUse% = 25
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllWhile:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 26
    MemoInUse% = 26
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllSelect:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 27
    MemoInUse% = 27
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllLabelMore:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 28
    MemoInUse% = 28
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllSubMore:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 29
    MemoInUse% = 29
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
AllDimMore:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 30
    MemoInUse% = 30
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
About:
    FOR i%=20 TO 32
        HIDE i%
    NEXT i%
    SHOW 32
    MemoInUse% = 32
    IF TEXT$(18) = "" THEN TEXT 18, "  >> Search >>"  
    ON_CLiCK 18, FindText
RETURN
' ------------------------------------------------------------------------------
Resize:
    FOR i% = 20 TO 32
        WIDTH i%, (WIDTH(0)-100)
        HEIGHT i%, (HEIGHT(0)-60)
    NEXT i%
RETURN
' ------------------------------------------------------------------------------
Bigger:
    FontSize%=FontSize% + 1
    IF FontSize% > 16 THEN FontSize% = 16 : RETURN
    FOR i% = 20 TO 32
        FONT_SIZE i%, FontSize%
    NEXT i%
    HIDE MemoInUse% : SHOW MemoInUse%
RETURN
' ------------------------------------------------------------------------------
Smaller:
    FontSize%=FontSize% - 1
    IF FontSize% < 8 THEN FontSize% = 8 : RETURN
    FOR i% = 20 TO 32
        FONT_SIZE i%, FontSize%
    NEXT i%
    HIDE MemoInUse% : SHOW MemoInUse%
RETURN
' ------------------------------------------------------------------------------
SUB Mask()
    WIDTH 0, 1025
        HEIGHT 0, 727
        LEFT 0,(SCREEN_X-WIDTH(0))/2
        TOP 0,(SCREEN_Y-HEIGHT(0))/2
        COLOR 0, 120,120,130
    BUTTON 1
        WIDTH 1, 100
        HEIGHT 1, 25
        LEFT 1,13
        TOP 1,10
        CAPTION 1, "&Open"
    BUTTON 2
        WIDTH 2, 100
        HEIGHT 2, 25
        LEFT 2,13
        TOP 2, 650
        CAPTION 2, "&Quit"
    BUTTON 3
        WIDTH 3, 100
        HEIGHT 3, 25
        LEFT 3,13
        TOP 3, 610
        CAPTION 3, "&About"
    CREATE_HIDE
    BUTTON 4
        WIDTH 4, 100
        HEIGHT 4, 25
        LEFT 4,13
        TOP 4,50
        CAPTION 4, "Sa&ve"
    BUTTON 5
        WIDTH 5, 100
        HEIGHT 5, 25
        LEFT 5,13
        TOP 5,125    
        CAPTION 5, "&Integral"  
    BUTTON 6
        WIDTH 6, 75
        HEIGHT 6, 25
        LEFT 6,13
        TOP 6,165    
        HINT 6, "Label, Gosub, Return"
        CAPTION 6, "&Label"  
    BUTTON 7
        WIDTH 7, 25
        HEIGHT 7, 25
        LEFT 7,88
        TOP 7,165    
        CAPTION 7, "+"  
    BUTTON 8
        WIDTH 8, 75
        HEIGHT 8, 25
        LEFT 8,13
        TOP 8,205    
        HINT 8, "Sub, Exit_Sub, End_sub, Fnc, Result, End_Fnc"
        CAPTION 8, "S&UB / FNC"  
    BUTTON 9
        WIDTH 9, 25
        HEIGHT 9, 25
        LEFT 9,88
        TOP 9,205    
        CAPTION 9, "+"  
    BUTTON 10
        WIDTH 10, 75
        HEIGHT 10, 25
        LEFT 10,13
        TOP 10,245    
        HINT 10, "Dim, Local_Dim, Free"
        CAPTION 10, "&DIM"  
    BUTTON 11
        WIDTH 11, 25
        HEIGHT 11, 25
        LEFT 11,88
        TOP 11,245    
        CAPTION 11, "+"  
    BUTTON 12
        WIDTH 12, 100
        HEIGHT 12, 25
        LEFT 12,13
        TOP 12,285    
        HINT 12, "If, Then, Else, End_if"
        CAPTION 12, "&IF"  
    BUTTON 13
        WIDTH 13, 100
        HEIGHT 13, 25
        LEFT 13,13
        TOP 13,325    
        HINT 13, "For, To, Step, Exit_For, Next"
        CAPTION 13, "&FOR"  
    BUTTON 14
        WIDTH 14, 100
        HEIGHT 14, 25
        LEFT 14,13
        TOP 14,365    
        HINT 14, "While, Exit_While, End_While, Repeat, Exit_Repeat, Until"  
        CAPTION 14, "&WHILE"  
    BUTTON 15
        WIDTH 15, 100
        HEIGHT 15, 25
        LEFT 15,13
        TOP 15,405    
        HINT 15, "Select, Case, End_Select"  
        CAPTION 15, "SE&LECT"  
    BUTTON 16
        WIDTH 16, 100
        HEIGHT 16, 25
        LEFT 16,13
        TOP 16,530    
        CAPTION 16, "S&maller"  
    BUTTON 17
        WIDTH 17, 100
        HEIGHT 17, 25
        LEFT 17,13
        TOP 17,570    
        CAPTION 17, "B&igger"  
    EDIT 18
        WIDTH 18, 100
        HEIGHT 18, 25
        LEFT 18,13
        TOP 18,470    
        TEXT 18, "  >> Search >>"  
    for i% = 1 to 18 : font_bold i% : next i%
    FOR i%= 20 TO 33
        LIST i%
        LEFT i%, 125
        TOP i%,10
        WIDTH i%, 870
        HEIGHT i%, 666
        FONT_NAME i%,"Courier New"
        FONT_SIZE i%,10
    NEXT i%
    SORT 28      
    SORT_ON 28
    SORT 29
    SORT_ON 29
    SORT 30
    SORT_ON 30
    SHOW 20
    TextAbout()
    MessageBox()
END_SUB
' ------------------------------------------------------------------------------
SUB MessageBox()
    PANEL 100
        WIDTH 100,300
        HEIGHT 100,200
        FONT_NAME 100,"Arial"
        FONT_SIZE 100,14
    COMMAND_TARGET_IS 100
    ALPHA 101
        TOP 101, 60
        LEFT 101, 100
        CAPTION 101, "Please wait"
    ALPHA 102
        TOP 102, 110
        LEFT 102, 60
        CAPTION 102, "Analyse in progress..."
    COMMAND_TARGET_IS 0
    SHOW 101
    SHOW 102
END_SUB
' ------------------------------------------------------------------------------
SUB WaitingMessage()
    TOP 100, (HEIGHT_CLIENT(0)-200)/2
    LEFT 100, (WIDTH_CLIENT(0)-300)/2
    SHOW 100
END_SUB
' ------------------------------------------------------------------------------
SUB TextAbout()
    ITEM_ADD 32,""
    b$="                      PANORAMIC FILE ANALYSER"
    ITEM_ADD 32, b$
    b$="            MARC - December 2017 - Panoramic v0.9.28.i12"
    ITEM_ADD 32, b$
    b$="  http://panoramic-language.pagesperso-orange.fr/French/index.html"
    ITEM_ADD 32, b$
    b$="                 http://panoramic.forumotion.com"
    ITEM_ADD 32, b$
END_SUB
' ------------------------------------------------------------------------------
Save:
    IF OBJECT_EXISTS(41)=0 THEN SAVE_DIALOG 41
    FILTER 41,"*.sav|*.sav"
    a$=FILE_NAME$(41)
    IF a$="_" THEN RETURN
    IF RIGHT$(a$,4)= ".sav" THEN a$ = LEFT$(a$,LEN(a$)-4)
    IF DIR_EXISTS(a$+"_txt")= 0 THEN DIR_MAKE a$+"_txt"
    FILE_SAVE 50,a$+"_txt\Source.txt"
    FOR i%=20 TO 31
        SELECT i%
            CASE 20 : FILE_SAVE i%,a$+"_txt\Integral.txt"
            CASE 21 : FILE_SAVE i%,a$+"_txt\Label.txt"
            CASE 22 : FILE_SAVE i%,a$+"_txt\Sub.txt"
            CASE 23 : FILE_SAVE i%,a$+"_txt\Dim.txt"
            CASE 24 : FILE_SAVE i%,a$+"_txt\If.txt"
            CASE 25 : FILE_SAVE i%,a$+"_txt\For.txt"
            CASE 26 : FILE_SAVE i%,a$+"_txt\While.txt"
            CASE 27 : FILE_SAVE i%,a$+"_txt\Select.txt"
            CASE 28 : FILE_SAVE i%,a$+"_txt\LabelMore.txt"
            CASE 29 : FILE_SAVE i%,a$+"_txt\SubMore.txt"
            CASE 30 : FILE_SAVE i%,a$+"_txt\DimMore.txt"
            CASE 31 : FILE_SAVE i%,a$+"_txt\Search.txt"
        END_SELECT
    NEXT i%
    ARCHIVER_ON
        ARCHIVER_ADD a$+"_txt",a$+".sav"
    ARCHIVER_OFF
RETURN
' ------------------------------------------------------------------------------
Quit:
    TERMINATE
RETURN

Aperçu:

==>  EDIT du 26 décembre 2017 à 11h00 : mise à jour du source (amélioration de la reconnaissance des LABELs + correction d'un bug).

==>  EDIT du 03 février 2018 à 16h30 : mise à jour du source : ajout de la reconnaissance des fonctions : FNC, RESULT, END_FNC.

==>  EDIT du 06 octobre 2018 à 02h38 : mise à jour du source : Mise en conformité avec la compilateur.


Dernière édition par Marc le Sam 6 Oct 2018 - 2:39, édité 10 fois
Revenir en haut Aller en bas
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyDim 24 Déc 2017 - 14:59

Salut Marc !

Hum intéressant, Il faut que je teste au plus vite ! Wink
Déjà que la version précédente était super alors là...
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
RMont




Nombre de messages : 233
Age : 81
Localisation : charente maritime
Date d'inscription : 29/12/2008

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyDim 24 Déc 2017 - 18:21

bonsoir marc.
j'ai essayé ton code qui fonctionne tres bien sauf que :
je clique sur labels: ils s'affichent bien tous  mais click sur le + ,il affiche zero alors qu'il y a plusieurs labels. et une petite question: a quoi sert le bouton << search >>. ce que j'ai vu c'est qu'il affiche l'intégrité du code..
a+
Revenir en haut Aller en bas
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyLun 25 Déc 2017 - 0:53

Ton programme est super Marc !
Il fonctionne très bien et il est rapide.
Un grand BRAVO !
cheers drunken santa geek sunny

@RMont :
Pour la fonction << search >>, cela te permet de retrouver une chaîne de caractères contenu dans ton programme.
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
RMont




Nombre de messages : 233
Age : 81
Localisation : charente maritime
Date d'inscription : 29/12/2008

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyLun 25 Déc 2017 - 17:20

bonjour a tous .
@ minibug.
marc doit-etre en vacances et sans ordi alors ,as-tu essayé l'objet de ma question sur l'affichage
des labels (clic sur + ) .chez moi ,il affiche bien les labels mais pas si clic sur plus.(+).
sinon tres tres bien
Revenir en haut Aller en bas
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyLun 25 Déc 2017 - 19:01

Salut Rmont !

Non je n'est pas eu de problèmes de ce coté. tout s'affiche correctement !
La preuve :

Analyse d'un source - Version 2.1 Sans_t15
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Marc

Marc


Nombre de messages : 2397
Age : 63
Localisation : TOURS (37)
Date d'inscription : 17/03/2014

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyMar 26 Déc 2017 - 11:04

Bonjour à tous !

Merci Rmont et Minibug pour vos retours.
Pardon de ne pas avoir réagi plus tôt, j'étais en déplacement pour Noël.
Merci Minibug d'avoir répondu.

Rmont, j'ai apporté une modification à mon programme pour améliorer la reconnaissance des LABEL(s) + la correction d'un bug.
Peux-tu, s'il te plait, le télécharger et refaire l'essai ?

Le premier post est à jour ainsi que mon Webdav.
Revenir en haut Aller en bas
RMont




Nombre de messages : 233
Age : 81
Localisation : charente maritime
Date d'inscription : 29/12/2008

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyMer 27 Déc 2017 - 18:19

bonjour a tous.
a marc.
j'e n'ai pas pu faire l'essai hier cause famille .aujourd'hui j'ai refait un essai et bien , c'est parfait .maintenant j'ai bien les labels qui s'affichent en ordre alphabètique. (avec le click sur +).tout est parfait.
ce code sera très utile pour débogage.
bonne continuation
Revenir en haut Aller en bas
Marc

Marc


Nombre de messages : 2397
Age : 63
Localisation : TOURS (37)
Date d'inscription : 17/03/2014

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyJeu 28 Déc 2017 - 3:13

Je suis content que cela fonctionne maintenant.
Le bug affectait uniquement une certaine syntaxe, ce qui explique que le défaut soit passé inaperçu chez Minibug et chez moi.
Pardon Rmont de ne pas avoir donné plus d’explication sur l’utilisation du programme, en particulier la fonction >> Search <<.

Merci Rmont, merci Minibug et merci à tous !

Pour ceux qui souhaitent modifier, améliorer ou personnaliser ce programme, voici les numéros d’objets utilisés :

Spoiler:
Revenir en haut Aller en bas
pascal10000

pascal10000


Nombre de messages : 812
Localisation : Troyes
Date d'inscription : 05/02/2011

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyJeu 28 Déc 2017 - 12:45

bjr marc

Félicitation pour ton programme. Il sera
très utile pour chacun d' entre nous Exclamation

Par contre ce que tu peut faire
avec ton programme c'est de le mettre
aussi pour d'autre langage pourquoi pas!
Revenir en haut Aller en bas
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyJeu 28 Déc 2017 - 19:19

Salut Marc !

Bonne idée les numéros d'objet en correspondance !  Wink

Si je réussi à remettre un jour GPP sur pied, j'intégrerai volonté un outil comme le tien.
Si tu es d'accord bien entendu... drunken


Dernière édition par Minibug le Jeu 28 Déc 2017 - 21:11, édité 1 fois
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Marc

Marc


Nombre de messages : 2397
Age : 63
Localisation : TOURS (37)
Date d'inscription : 17/03/2014

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptyJeu 28 Déc 2017 - 21:07

Minibug a écrit:
j'intégrerai volonté un outil comme le tiens.
Si tu es d'accord bien entendu...

Oui Minibug, pas de problème, je suis tout à fait d’accord !
Chacun est totalement libre de prendre tout ou partie du code, de le modifier ou de l’intégrer dans un autre code.
Revenir en haut Aller en bas
Marc

Marc


Nombre de messages : 2397
Age : 63
Localisation : TOURS (37)
Date d'inscription : 17/03/2014

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptySam 3 Fév 2018 - 16:37

Bonjour à tous !

Nouvelle version 2.1 de l'analyseur :

==> Ajout de la reconnaissance des fonctions (mots-clés FNC, RESULT et END_FNC).

Le source du premier post est à jour.
Revenir en haut Aller en bas
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptySam 2 Juin 2018 - 16:45

Marc, je viens de tester PanExpress avec ton analyseur.
J'ai un bug en ligne 310 ! Suspect

Le code BAS est sur mon Webdav.
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Marc

Marc


Nombre de messages : 2397
Age : 63
Localisation : TOURS (37)
Date d'inscription : 17/03/2014

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptySam 2 Juin 2018 - 17:17

Désolé Minibug !
Le dysfonctionnement provient du fait que la ligne 1464 du ton code possède 50 espaces inutiles et invisibles en fin de ligne.
Détail de la ligne 1664 :
Citation :
SUB memo_couleur_palette(coul%)  

Tu supprimes les espaces invisibles et c'est bon.

je vais voir comment trouver une parade dans mon programme d'analyse.

Edit :
Explication technique du bug de l'analyseur : pour l'affichage à l'écran, j'ai limité la longueur d'un nom de SUB à 70 caractères. Or, avec les 50 espaces en fin de nom de SUB, on dépasse le seuil de 70 caractères.
Revenir en haut Aller en bas
Minibug

Minibug


Nombre de messages : 4566
Age : 57
Localisation : Vienne (86)
Date d'inscription : 09/02/2012

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptySam 2 Juin 2018 - 17:42

Ah mince ! Désolé.

Est ce tu ne pourrais pas utiliser TRIM$ pour supprimer les blancs en début et en fin de chaîne ?

PS : J'ai testé en enlevant les espaces et ça fonctionne parfaitement. cheers
Revenir en haut Aller en bas
http://gpp.panoramic.free.fr
Marc

Marc


Nombre de messages : 2397
Age : 63
Localisation : TOURS (37)
Date d'inscription : 17/03/2014

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptySam 2 Juin 2018 - 18:08

Oui, Minibug, c'est une excellente idée.

Je sortirai une nouvelle version modifiée.

Merci !
Revenir en haut Aller en bas
Marc

Marc


Nombre de messages : 2397
Age : 63
Localisation : TOURS (37)
Date d'inscription : 17/03/2014

Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 EmptySam 6 Oct 2018 - 2:44

Bonjour à tous !

Dans un autre post,
Jack a écrit:
1 - utilisation des commandes au lieu des fonctions:
utilisation de FILE_READ N,V$ au lieu de V$=FILE_READ$(N) et de FILE_READLN N,V$ au lieu de V$=FILE_READLN$(N)

Ayant fait cette erreur, je viens de rectifier le source sur le premier post de ce fil de discussion.
Webdav à jour également.
Revenir en haut Aller en bas
Contenu sponsorisé





Analyse d'un source - Version 2.1 Empty
MessageSujet: Re: Analyse d'un source - Version 2.1   Analyse d'un source - Version 2.1 Empty

Revenir en haut Aller en bas
 
Analyse d'un source - Version 2.1
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Mise en forme de fichier source Panoramic (nième version)
» Amelioration du source
» Le source d'un jeu de dames internationnales si ça interesse
» Analyse d'un programme source .bas
» Une astuce sur l'encodage de vos source

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos sources, vos utilitaires à partager-
Sauter vers: