Paradox Community

Items in pnews.paradox-dos

Subject:Re: QBE parse Update
Date:Fri, 26 Jan 2018 23:09:43 +0000
From:Michael Kennedy <Info@KennedySoftware.ie>
Newsgroups:pnews.paradox-dos
Thank you for the feedback, Bernie. Sounds both excellent, and darn complex!

   - Mike


On 26/01/2018 20:28, Bernie van't Hof wrote:
> I'm first trying to get parsing playing nicely without wildcards. 
> Whether or not this is a mistake will be seen later.
> 
> It is now state table based and tracks input types much more closely, 
> greatly reducing code complexity.
> 
> Yesterday I realised links (_link) can be referenced before where 
> defined but I need to know their column types. So I added a first-pass 
> to dig them all out. I can't see a way around that.
> 
> With two passes it is likely much could be improved/changed, but for now 
> I'll leave the rest of the code structure alone.
> 
> Date math gets interesting:
> 
> 11-Jan-2016-1/10/2016+15.10.2016-4
> 
> produces:
> 
> DATE_SUB(DATE_ADD('2016-10-15', INTERVAL DATEDIFF('2016-1-11', 
> '2016-1-10') DAY), INTERVAL 4 DAY)
> 
> Two-digit years <70 ==> 20xx, >=70 ==> 19xx
> 
> Unlike pdox 2 + 10-oct-2017 in a date column produces 
> DATE_ADD('2017-10-10', INTERVAL '2' DAY) instead of a type error.
> 
> Still lots to do, but feels like it is heading in the right direction.
> 
> Even as I write this I'm wondering if I shouldn't add lookahead/rollback 
> into the stream component so the lexer can give higher-level tokens to 
> further simplify parsing .....


Copyright © 2004 thedbcommunity.com