On 08/24/2014 12:42 PM, Benjamin Franksen wrote:
> ...
>
> The db/dbd syntax can be generalized to a very simple syntax that basically
> recognizes one kind of item:
>
> item ::= keyword "(" arg "," ... ")" [ "{" item ... "}" ]
This would be ideal were it not for three things: embedded C code '%',
statements like 'addpath' which don't have '(', and break point tables
(just numbers).
What I have is the following where a 'value' is either a keyword, quoted
string, or number. "%.*$" is lexed as 'code'.
item ::= value '(' value ',' ... ')' [ '{' item ... '}' ]
| value value
| code
Break point table entries and "addpath" are parsed as "value value".
This definition parses all the existing dbd files I've tried so far from
base and synapps.
> ...
> The main point is that the syntax is now easily extensible by adding a new
> keyword and the corresponding function in the table. Unknown keywords
> (together with the item they introduce) are ignored (or optionally give
> warning), so that future extensions never break existing parsers.
Yup, this is the goal.
Attachment:
signature.asc
Description: OpenPGP digital signature
- Replies:
- Re: Array data in db files? Benjamin Franksen
- References:
- Array data in db files? Ralph Lange
- Re: Array data in db files? Michael Davidsaver
- Re: Array data in db files? Benjamin Franksen
- Navigate by Date:
- Prev:
Re: ePID deadband on output Benjamin Franksen
- Next:
RE: ePID deadband on output Mark Rivers
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Array data in db files? Benjamin Franksen
- Next:
Re: Array data in db files? Benjamin Franksen
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|