JavaCC Config Import/Export

View: New views
2 Messages — Rating Filter:   Alert me  

JavaCC Config Import/Export

by Matt Ouellette-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have recently been tasked with implementing a configuration
import/export utility, and someone had suggested to me that javacc would
be a good tool for the job.

Looking around online, I found a few mention of it being used to read a
configuration file, but the trouble I'm finding is that they all only
mention it briefly and none mention anything about an equivalent writing
of a configuration file.  With my limit understanding of javacc it seems
like it wouldn't work for an export, so my import and export would end
up being two completely separate utilities.

What I was wondering was if anyone had any experience with using javacc
to implement an import/export utility, and how well it worked.  Also,
since I'm still new to javacc and most examples have to do with writing
a compiler, I was wonder if this is even a good use for it or am I
completely misusing the tool and heading for a huge headache

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: JavaCC Config Import/Export

by J.Chris Findlay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If your "import" step parses the input into an AST, one can teach the
nodes in the tree how to output themselves, and then use a simple tree
walk using the visitor pattern to output all of them in the right
order/place.

This is how code-reformatters work (when they are not just altering
the token stream based on the tree nodes that "own" those tokens).

On Thu, Jul 10, 2008 at 4:08 AM, Matt Ouellette <matto@...> wrote:

> I have recently been tasked with implementing a configuration import/export
> utility, and someone had suggested to me that javacc would be a good tool
> for the job.
>
> Looking around online, I found a few mention of it being used to read a
> configuration file, but the trouble I'm finding is that they all only
> mention it briefly and none mention anything about an equivalent writing of
> a configuration file.  With my limit understanding of javacc it seems like
> it wouldn't work for an export, so my import and export would end up being
> two completely separate utilities.
>
> What I was wondering was if anyone had any experience with using javacc to
> implement an import/export utility, and how well it worked.  Also, since I'm
> still new to javacc and most examples have to do with writing a compiler, I
> was wonder if this is even a good use for it or am I completely misusing the
> tool and heading for a huge headache
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>



--
 - J.Chris Findlay
 (c:

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price