PPL在运行命令

时间:2018-03-20 12:01:38

标签: compiler-errors compilation ppl

我需要在ppl命令中运行一些ppl代码。

以下是代码:

service tar0_starter

    function start
        const pathFolder= OS.consol?.ask_string ("Please enter at path of file:") if_null: error
        const my_folder = directory.creat(directory_path.create (pathFolder))
            if not my_folder.exists then
            OS.out.write_line("the folder dont found")
            exit script
            .

        my_folder.file_list( include_child_directories=no) ( const file_list=result,const error=error)
            if error isnt null then
                OS.out.write_line("""folder not available""")
                exit script
            .       

        if file_list is not null then 
            repeate for each file in file_list
            const nameFile=file.name.to_string
            var pathFilestring =pathFolder.to_string & "\\" & nameFile.to_string
            const fileC file =fa_file .create_from_valid_string (pathFile.to_string)
            se_text_file_IO.restore_lines_from_text_file (file=fileC) (const text_in_file=result ,const read_error =error)
            nameFile.split  (split_by ="." ) ( const type =result)
            const checkType = type.last
            if const checkType is not null then
                if checkType=v "vm" then
                    if text_in_file is not null then
                        OS.out write_line ("""check file {{nameFile}}""")
                            repeat for each continent in text_in_file 
                                if continentis not null then 
                                    continent.split(split_by = " ")(constmerge=result)
                                        const word=merge.first
                                         if word is not null
                                            if word=v "you" then
                                                OS.out write_line ("""{{continent}}""")
                                            .   
                                        .       
                                .
                    .
                .
            .
        .
            OS_process.exit_with_success
    .
.

我从ppl教程复制此代码(意味着它需要运行良好..) 当我运行此代码时,我收到很多错误:

Restoring library repository from file 'C:\Program Files\ppl-2018-01-23\ppl_lib\ppl_assistant.par'
Restoring library repository from file 'C:\Program Files\ppl-2018-01-23\ppl_lib\ppl_commands.par'
Restoring library repository from file 'C:\Program Files\ppl-2018-01-23\ppl_lib\ppl_compiler.par'
Restoring library repository from file 'C:\Program Files\ppl-2018-01-23\ppl_lib\ppl_core.par'
Restoring library repository from file 'C:\Program Files\ppl-2018-01-23\ppl_lib\ppl_ext.par'
Restoring library repository from file 'C:\Program Files\ppl-2018-01-23\ppl_lib\ppl_paiom.par'
Restoring library repository from file 'C:\Program Files\ppl-2018-01-23\ppl_lib\ppl_projects.par'
Warning


Error
       location: Service tar0_starter (tar0)
        line no: 11
       position: 72
    instruction: my_folder.file_list ( include_child_directories=no) ( const fi
                 le_list >>> =result,const error=error)
    description: Id or Id path required. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 11
       position: 72
    instruction: my_folder.file_list ( include_child_directories=no) ( const fi
                 le_list >>> =result,const error=error)
    description: ')' required. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 11
       position: 72
    instruction: my_folder.file_list ( include_child_directories=no) ( const fi
                 le_list >>> =result,const error=error)
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 12
       position: 13
    instruction: if error  >>> isnt null then
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 18
       position: 12
    instruction: repeate  >>> for each file in file_list
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 22
       position: 81
    instruction: se_text_file_IO.restore_lines_from_text_file (file=fileC) (con
                 st text_in_file >>> =result ,const read_error =error)
    description: Id or Id path required. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 22
       position: 81
    instruction: se_text_file_IO.restore_lines_from_text_file (file=fileC) (con
                 st text_in_file >>> =result ,const read_error =error)
    description: ')' required. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 22
       position: 81
    instruction: se_text_file_IO.restore_lines_from_text_file (file=fileC) (con
                 st text_in_file >>> =result ,const read_error =error)
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 23
       position: 50
    instruction: nameFile.split  (split_by ="." ) ( const type  >>> =result)
    description: Id or Id path required. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 23
       position: 50
    instruction: nameFile.split  (split_by ="." ) ( const type  >>> =result)
    description: ')' required. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 23
       position: 50
    instruction: nameFile.split  (split_by ="." ) ( const type  >>> =result)
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 25
       position: 13
    instruction: if const  >>> checkType is not null then
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 28
       position: 14
    instruction: OS.out  >>> write_line (fa_mutable_string.create.append("check
                  file ").append_scalar_or_scalar_value(nameFile).to_string)
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 30
       position: 24
    instruction: if continentis  >>> not null then
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 31
       position: 52
    instruction: continent.split(split_by = " ")(constmerge >>> =result)
    description: '=' required. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 31
       position: 52
    instruction: continent.split(split_by = " ")(constmerge >>> =result)
    description: ')' required. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 31
       position: 52
    instruction: continent.split(split_by = " ")(constmerge >>> =result)
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
        line no: 35
       position: 20
    instruction: OS.out  >>> write_line (fa_mutable_string.create.append_scalar
                 _or_scalar_value(continent).to_string)
    description: Rest of line is invalid and ignored. [parser]

Error
       location: Service tar0_starter (tar0)
    description: '.' or '. service' required. [parser]

Parser         :    0.204 sec.
Total time     :    0.242 sec. (empty .class dir + create .par file:    0.242 sec.)
Warning
       location: Type unknown (unknown)
    description: File 'C:\project0\tar0\work\ppl\source_code\tar0\hello.vm' is
                 invalid because its extension is undefined or different from '
                 ppl'. Note that files starting with '---' are silently ignored
                 . [libraries_warning]
Error
       location: Service tar0_starter (tar0)
        line no: 11
       position: 72
    instruction: my_folder.file_list ( include_child_directories=no) ( const fi
                 le_list >>> =result,const error=error)
    description: Id or Id path required. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 11
       position: 72
    instruction: my_folder.file_list ( include_child_directories=no) ( const fi
                 le_list >>> =result,const error=error)
    description: ')' required. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 11
       position: 72
    instruction: my_folder.file_list ( include_child_directories=no) ( const fi
                 le_list >>> =result,const error=error)
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 12
       position: 13
    instruction: if error  >>> isnt null then
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 18
       position: 12
    instruction: repeate  >>> for each file in file_list
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 22
       position: 81
    instruction: se_text_file_IO.restore_lines_from_text_file (file=fileC) (con
                 st text_in_file >>> =result ,const read_error =error)
    description: Id or Id path required. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 22
       position: 81
    instruction: se_text_file_IO.restore_lines_from_text_file (file=fileC) (con
                 st text_in_file >>> =result ,const read_error =error)
    description: ')' required. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 22
       position: 81
    instruction: se_text_file_IO.restore_lines_from_text_file (file=fileC) (con
                 st text_in_file >>> =result ,const read_error =error)
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 23
       position: 50
    instruction: nameFile.split  (split_by ="." ) ( const type  >>> =result)
    description: Id or Id path required. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 23
       position: 50
    instruction: nameFile.split  (split_by ="." ) ( const type  >>> =result)
    description: ')' required. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 23
       position: 50
    instruction: nameFile.split  (split_by ="." ) ( const type  >>> =result)
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 25
       position: 13
    instruction: if const  >>> checkType is not null then
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 28
       position: 14
    instruction: OS.out  >>> write_line (fa_mutable_string.create.append("check
                  file ").append_scalar_or_scalar_value(nameFile).to_string)
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 30
       position: 24
    instruction: if continentis  >>> not null then
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 31
       position: 52
    instruction: continent.split(split_by = " ")(constmerge >>> =result)
    description: '=' required. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 31
       position: 52
    instruction: continent.split(split_by = " ")(constmerge >>> =result)
    description: ')' required. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 31
       position: 52
    instruction: continent.split(split_by = " ")(constmerge >>> =result)
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
        line no: 35
       position: 20
    instruction: OS.out  >>> write_line (fa_mutable_string.create.append_scalar
                 _or_scalar_value(continent).to_string)
    description: Rest of line is invalid and ignored. [parser]
Error
       location: Service tar0_starter (tar0)
    description: '.' or '. service' required. [parser]Press any key to continue . . .

我尝试在谷歌中寻找这种语言,但没有,我不知道这段代码有什么问题。 我发现只有一个网站:ppl site

有人可以帮帮我吗?

由于

0 个答案:

没有答案