Hello any one. :-)
I'm interested in wrting a file parser using AmigaDOS routines. In particular ReadArgs() and any related functions. The file could be read into memory or read in line by line.
The file read in would be similar to an AmigaDOS template and in some places exactly alike. I'd like to be able to pick out key words and act out on them. That is the key words themselves would each represent a different template. Like different commands.
I'd also like to deal with comments and mask them out. The end result would be like a basic shell script. Where it loads in a line and interprets it. Mine would be similar. But I would use it to load in settings so it would be somewhat like a settings file. I can see an example will be needed to demonstrate.
Has anyone used ReadArgs() for this purpose? As you can see my examplle would be suitable for this purpose. I looked online but found no examples, just brief talk of doing it.
- VERSION 1.0
- LABEL "Label"
- KEY Example="String"
- OPTION ACTIVATE SELECT=1
- EXTRA OPTIONS ON
This would correlate to the following keyword templates:
OPTION ACTIVATE/S SELECTK/N OTHER/K