Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #17385 > unrolled thread

Does anyone have a JSON lexer in ANS Forth?

Started byAlex McDonald <blog@rivadpm.com>
First post2012-11-19 09:46 -0800
Last post2012-11-19 22:08 -0800
Articles 8 — 4 participants

Back to article view | Back to comp.lang.forth


Contents

  Does anyone have a JSON lexer in ANS Forth? Alex McDonald <blog@rivadpm.com> - 2012-11-19 09:46 -0800
    Re: Does anyone have a JSON lexer in ANS Forth? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-11-19 19:59 +0000
      Re: Does anyone have a JSON lexer in ANS Forth? Alex McDonald <blog@rivadpm.com> - 2012-11-19 15:10 -0800
        Re: Does anyone have a JSON lexer in ANS Forth? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-11-20 07:13 +0000
          Re: Does anyone have a JSON lexer in ANS Forth? Alex McDonald <blog@rivadpm.com> - 2012-11-20 04:12 -0800
            Re: Does anyone have a JSON lexer in ANS Forth? Alex McDonald <blog@rivadpm.com> - 2012-11-21 04:35 -0800
      Re: Does anyone have a JSON lexer in ANS Forth? Paul Rubin <no.email@nospam.invalid> - 2012-11-19 15:42 -0800
        Re: Does anyone have a JSON lexer in ANS Forth? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-19 22:08 -0800

#17385 — Does anyone have a JSON lexer in ANS Forth?

FromAlex McDonald <blog@rivadpm.com>
Date2012-11-19 09:46 -0800
SubjectDoes anyone have a JSON lexer in ANS Forth?
Message-ID<ba0b6bd4-2ed7-428b-8d10-905625c09afa@q4g2000vbg.googlegroups.com>
... that they'd be willing to share under a GPL or BSD license? The C
libraries I've found (for example, jansson http://www.digip.org/jansson/)
are too full of C-isms to be of much use when calling from Forth. All
I'm interested in right now is the lexer; I'll be adding my own
processing of the data structures.

[toc] | [next] | [standalone]


#17389

FromGerry Jackson <gerry@jackson9000.fsnet.co.uk>
Date2012-11-19 19:59 +0000
Message-ID<k8e32d$9u3$1@dont-email.me>
In reply to#17385
On 19/11/2012 17:46, Alex McDonald wrote:
> .... that they'd be willing to share under a GPL or BSD license? The C
> libraries I've found (for example, jansson http://www.digip.org/jansson/)
> are too full of C-isms to be of much use when calling from Forth. All
> I'm interested in right now is the lexer; I'll be adding my own
> processing of the data structures.
>

See the Forth Foundation Library http://code.google.com/p/ffl/wiki/jis

-- 
Gerry

[toc] | [prev] | [next] | [standalone]


#17401

FromAlex McDonald <blog@rivadpm.com>
Date2012-11-19 15:10 -0800
Message-ID<04ae4caa-85cf-499a-ae73-af4a168fb7fd@a6g2000vbl.googlegroups.com>
In reply to#17389
On Nov 19, 7:59 pm, Gerry Jackson <ge...@jackson9000.fsnet.co.uk>
wrote:
> On 19/11/2012 17:46, Alex McDonald wrote:
>
> > .... that they'd be willing to share under a GPL or BSD license? The C
> > libraries I've found (for example, janssonhttp://www.digip.org/jansson/)
> > are too full of C-isms to be of much use when calling from Forth. All
> > I'm interested in right now is the lexer; I'll be adding my own
> > processing of the data structures.
>
> See the Forth Foundation Libraryhttp://code.google.com/p/ffl/wiki/jis
>
> --
> Gerry

Thanks Gerry. In case anyone else tries it I downloaded the SVN
version as the default 8.00 and 8.01 builds don't contain the source;
svn checkout http://ffl.googlecode.com/svn/trunk/ ffl

[toc] | [prev] | [next] | [standalone]


#17420

FromGerry Jackson <gerry@jackson9000.fsnet.co.uk>
Date2012-11-20 07:13 +0000
Message-ID<k8fajc$vfk$1@dont-email.me>
In reply to#17401
On 19/11/2012 23:10, Alex McDonald wrote:
> On Nov 19, 7:59 pm, Gerry Jackson <ge...@jackson9000.fsnet.co.uk>
> wrote:
>> On 19/11/2012 17:46, Alex McDonald wrote:
>>
>>> .... that they'd be willing to share under a GPL or BSD license? The C
>>> libraries I've found (for example, janssonhttp://www.digip.org/jansson/)
>>> are too full of C-isms to be of much use when calling from Forth. All
>>> I'm interested in right now is the lexer; I'll be adding my own
>>> processing of the data structures.
>>
>> See the Forth Foundation Libraryhttp://code.google.com/p/ffl/wiki/jis
>>
>> --
>> Gerry
>
> Thanks Gerry. In case anyone else tries it I downloaded the SVN
> version as the default 8.00 and 8.01 builds don't contain the source;
> svn checkout http://ffl.googlecode.com/svn/trunk/ ffl
>

Strange, it was described so I assumed it was in the standard download. 
I haven't used it myself, perhaps the author doesn't yet consider it 
fully tested.

-- 
Gerry

[toc] | [prev] | [next] | [standalone]


#17429

FromAlex McDonald <blog@rivadpm.com>
Date2012-11-20 04:12 -0800
Message-ID<4adb36ab-ef4e-4e7e-8921-ca4ad9691868@6g2000pbh.googlegroups.com>
In reply to#17420
On Nov 20, 7:13 am, Gerry Jackson <ge...@jackson9000.fsnet.co.uk>
wrote:
> On 19/11/2012 23:10, Alex McDonald wrote:
>
>
>
>
>
>
>
>
>
> > On Nov 19, 7:59 pm, Gerry Jackson <ge...@jackson9000.fsnet.co.uk>
> > wrote:
> >> On 19/11/2012 17:46, Alex McDonald wrote:
>
> >>> .... that they'd be willing to share under a GPL or BSD license? The C
> >>> libraries I've found (for example, janssonhttp://www.digip.org/jansson/)
> >>> are too full of C-isms to be of much use when calling from Forth. All
> >>> I'm interested in right now is the lexer; I'll be adding my own
> >>> processing of the data structures.
>
> >> See the Forth Foundation Libraryhttp://code.google.com/p/ffl/wiki/jis
>
> >> --
> >> Gerry
>
> > Thanks Gerry. In case anyone else tries it I downloaded the SVN
> > version as the default 8.00 and 8.01 builds don't contain the source;
> > svn checkouthttp://ffl.googlecode.com/svn/trunk/ffl
>
> Strange, it was described so I assumed it was in the standard download.
> I haven't used it myself, perhaps the author doesn't yet consider it
> fully tested.
>
> --
> Gerry

I'm going to use it (with attribution to dvoudheusden ???) as the
basis for my own parser, since my requirements are slightly different
than those JIS addresses.

[toc] | [prev] | [next] | [standalone]


#17458

FromAlex McDonald <blog@rivadpm.com>
Date2012-11-21 04:35 -0800
Message-ID<9cafbc7e-ce44-48e5-aa0b-4968a12d9d9f@bq2g2000vbb.googlegroups.com>
In reply to#17429
On Nov 20, 12:12 pm, Alex McDonald <b...@rivadpm.com> wrote:
> On Nov 20, 7:13 am, Gerry Jackson <ge...@jackson9000.fsnet.co.uk>
> wrote:
>
>
>
>
>
>
>
>
>
> > On 19/11/2012 23:10, Alex McDonald wrote:
>
> > > On Nov 19, 7:59 pm, Gerry Jackson <ge...@jackson9000.fsnet.co.uk>
> > > wrote:
> > >> On 19/11/2012 17:46, Alex McDonald wrote:
>
> > >>> .... that they'd be willing to share under a GPL or BSD license? The C
> > >>> libraries I've found (for example, janssonhttp://www.digip.org/jansson/)
> > >>> are too full of C-isms to be of much use when calling from Forth. All
> > >>> I'm interested in right now is the lexer; I'll be adding my own
> > >>> processing of the data structures.
>
> > >> See the Forth Foundation Libraryhttp://code.google.com/p/ffl/wiki/jis
>
> > >> --
> > >> Gerry
>
> > > Thanks Gerry. In case anyone else tries it I downloaded the SVN
> > > version as the default 8.00 and 8.01 builds don't contain the source;
> > > svn checkouthttp://ffl.googlecode.com/svn/trunk/ffl
>
> > Strange, it was described so I assumed it was in the standard download.
> > I haven't used it myself, perhaps the author doesn't yet consider it
> > fully tested.
>
> > --
> > Gerry
>
> I'm going to use it (with attribution to dvoudheusden ???) as the
> basis for my own parser, since my requirements are slightly different
> than those JIS addresses.

Change of plan. After looking at the code, it's not really that
suitable at all. I've started with my own parser, since I want to be
able to (1) support extensions to JSON (2) plug it into the Forth
parser. Something along the lines of a super CREATE;

24 constant lucklast
create myname ," Alex"
json mother { "person" : "Carol" ,
              "children" : { "Bill" : 8 , "Ted" : 6 }
            }
json father { "person" : $myname ,
              "children" : mother/children ,
              "firstchild" : { mother/children#1 } ,
              "luckynumbers" : [ 21 , 22 , 23 , %lucklast ]
            }

[toc] | [prev] | [next] | [standalone]


#17403

FromPaul Rubin <no.email@nospam.invalid>
Date2012-11-19 15:42 -0800
Message-ID<7xobit17nn.fsf@ruckus.brouhaha.com>
In reply to#17389
Gerry Jackson <gerry@jackson9000.fsnet.co.uk> writes:
> See the Forth Foundation Library http://code.google.com/p/ffl/wiki/jis

Wow, that library is awesome.

[toc] | [prev] | [next] | [standalone]


#17419

FromHugh Aguilar <hughaguilar96@yahoo.com>
Date2012-11-19 22:08 -0800
Message-ID<ad2bd6cc-829d-49c6-848e-44b648f9bbc7@x9g2000pbe.googlegroups.com>
In reply to#17403
On Nov 19, 4:42 pm, Paul Rubin <no.em...@nospam.invalid> wrote:
> Gerry Jackson <ge...@jackson9000.fsnet.co.uk> writes:
> > See the Forth Foundation Libraryhttp://code.google.com/p/ffl/wiki/jis
>
> Wow, that library is awesome.

What is so awesome about FFL? Have you actually tried using it, or did
you just read the list of things that it supports?

A lot of people seem to think that FFL is awesome. For example,
Passaniti says this:

On Oct 19 2010, 11:35 am, John Passaniti <john.passan...@gmail.com>
wrote:
> I have no idea if the FFL is used by anyone and it really doesn't
> matter.  I briefly looked at the code, found they have a fairly rich
> and useful set of algorithms and data structures with decent interface
> and good documentation.  I can't vouch for the quality of the
> implementation, but from what I see, if you're a novice to Forth--
> especially if come to Forth from another language that's equally rich
> in terms of libraries-- then FFL seems like a winner.

This was from:
https://groups.google.com/group/comp.lang.forth/browse_thread/thread/6ed71f11d3582405

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.forth


csiph-web