ANSWERS: 2
  • Breaking out the components of a character string. The nature of the character string is important because it defines the set of allowable substrings, but almost any meaningful string is a candidate for parsing. I use many algorithms and techniques from the 2-volume set by Galler and Perlis, especially volume 1, about page 67, where it describes representing the substrings as tokens and then matching up the assembled token string against a known pattern. So, parsing an assembler statement, like: EXIT BR R14 reveals three substrings: a label ("EXIT"), an op code ("BR"), and a single parameter ("R14"). Each is location-dependent, and could be followed by a comment and/or a continuation flag and/or a sequence number.
  • A program separates the characters of a sentence or phrase and tries to determine what each word means. If the words are valid, or all the words that are valid for that program or application, are parsed. Once the characters are parsed the meaning of the phase or string can be determined.

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy