RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    What is "parsing"?

    Scheduled Pinned Locked Moved Help and Support
    nomenclaturedefitionpython
    6 Posts 5 Posters 891 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LouFL
      LouF
      last edited by

      I've read a definition that "parsing" is "grammar : to divide (a sentence) into grammatical parts and identify the parts and their relations to each other
      : to study (something) by looking at its parts closely"

      In this Linux culture, is "parsing" just the observation of, or is it more the reading a piece of "echoed" data from a string of parameters such as from the status of a video feed. E.g. reading parameters and using those to build or input to some other function (concatenate)?

      This word is used frequently, and I'm not sure exactly what is meant.

      Pi#2: 4B-2Gb, 5.10.11-v7l+ firmware, 3A power supply
      RetroPie v. 4.7.1 pre-made SD image, transferred from Pi#1
      Emulation Station v. 2.9.6RP
      RetroArch 1.8.8
      Controller: Vilros SNES wireless USB
      WD easystore HDD - 1TB

      Pi#1: 4B-2Gb, 5.4.72-v7l+

      rkosterR muldjordM B ClydeC 4 Replies Last reply Reply Quote 0
      • rkosterR
        rkoster @LouF
        last edited by

        @louf In programming in general (not just Linux) parsing means to take a stream of input data, typically text, and break it apart into units of meaning.

        The “parser” is what takes a command line string like

        GET LAMP
        

        or

        mv filename newfile
        

        and interprets it as commands with targets.

        It applies equally to interpreting much longer sets of data, such as config files or even code.

        Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

        1 Reply Last reply Reply Quote 3
        • muldjordM
          muldjord @LouF
          last edited by muldjord

          @louf "Parsing" is not something specific to Linux culture. It's a datastream thing. You parse through data to make meaning of it.

          An example is an XML parser. XML is a markup document language you can use to define basically any kind of data structure in a human-readable way. To use it in a piece of software you would then need a parser to walk through the document and put the necessary data in the correct data structures in memory for use with whatever the software was designed to do.

          Basically, whenever you read a document from start to finish, you parse through it in a certain way to make sense of it. The parser knows what to look for (it has a recipe you could say) and what to do with the data when it recognizes things it expects to run into.

          But as @rkoster points out, it can also be a command-line parser which is more comparable to your original grammar description.

          I think the most concise description I could make of the word "parsing" is: Read arbitrary data and make sense of it using a known recipe.

          1 Reply Last reply Reply Quote 1
          • B
            barbudreadmon @LouF
            last edited by

            @louf Parsing is about translating a block of text which follows a certain structure into something with a meaning for a program. It's not a "linux" thing, every time you open your web browser you are parsing something in html language.

            FBNeo developer - github - forum

            1 Reply Last reply Reply Quote 1
            • LouFL
              LouF
              last edited by

              Thanks, all. I know it's elementary, but I wanted to know how precisely or loosely the term was being used, and of human or computer context.

              Pi#2: 4B-2Gb, 5.10.11-v7l+ firmware, 3A power supply
              RetroPie v. 4.7.1 pre-made SD image, transferred from Pi#1
              Emulation Station v. 2.9.6RP
              RetroArch 1.8.8
              Controller: Vilros SNES wireless USB
              WD easystore HDD - 1TB

              Pi#1: 4B-2Gb, 5.4.72-v7l+

              1 Reply Last reply Reply Quote 1
              • ClydeC
                Clyde @LouF
                last edited by

                Wikipedia has an elaborate artikle about Parsing and its meaning in Computer Languages.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post

                Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.