Search code examples
parsingcompiler-constructiontokenizeterminology

What is the correct terminology for the process of reading a simple config and creating data structures corresponding to the data we acquired?


Reading is defined as interpreting and understanding a written material.

Parsing is defined as analyzing relationships between words in a written material and grouping those words according to underlying grammar.

My question is, what is the correct terminology for the process of reading a simple config and creating data structures corresponding to the data we acquired, parsing or reading?

I read many places about this distinction but I wasn't able to arrive at a conclusion by myself. In many places these terms used in an interchangeable manner. For example:

1. Reading a Lisp object means parsing a Lisp expression in textual form and producing a corresponding Lisp object.
From <http://zvon.org/other/elisp/Output/SEC256.html> 


2. In the programming language Lisp, the reader or read function is the parser which converts the textual form of Lisp objects to the corresponding internal object structure.
From <https://en.wikipedia.org/wiki/Lisp_reader> 

So I have a mixed understanding for parsing (grouping tokens in to syntactical elements) and creating data structures by using the elements we get from parsing (interpreting). I would much appreciate clear explanation of these topics and advision of sources where I can make further research about these topics.


Solution

  • There is no single “correct terminology” without context. Words are used with different meanings in different contexts.

    Often when discussing computing, “reading” means retrieving data, and “parsing” means analyzing a string of characters or other symbols relative to some rules for their grammar and interpretation. However, these meanings should not be taken as absolute; the words can be used in other ways.