Quantcast

Sample application

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sample application

smartmobili
Hi,

I would like to parse some java source code and compare with antlr parser for instance.
I have downloaded parboiled package as zip file and unzipped but I am really not an expert in java world
and especially with build process.
How can I build framework and sample applications ?
From what I understand sbt seems to be necessary to build it, am I wrong ?
What is the procedure ?

Thanks
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample application

mathias
Administrator
You don't need to build parboiled in order to use it.
Just add it as a dependency and use it according to the documentation.

Cheers,
Mathias

---
[hidden email]
http://www.parboiled.org

On 10.04.2012, at 14:45, smartmobili [via parboiled users] wrote:

> Hi,
>
> I would like to parse some java source code and compare with antlr parser for instance.
> I have downloaded parboiled package as zip file and unzipped but I am really not an expert in java world
> and especially with build process.
> How can I build framework and sample applications ?
> From what I understand sbt seems to be necessary to build it, am I wrong ?
> What is the procedure ?
>
> Thanks
>  
>
> If you reply to this email, your message will be added to the discussion below:
> http://users.parboiled.org/Sample-application-tp3899492p3899492.html
> To start a new topic under parboiled users, email [hidden email]
> To unsubscribe from parboiled users, click here.
> NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample application

smartmobili
Ok I will try but if you already have a simple console application it would help.
Anyway I am new to PEG parser and my question is whne using it to parse java, would it recognize some piece of code without having the whole file ?
For instance when trying antlr I cannot pass just a method declaration, I have to pass the whole file.
So if I only have something like void foobar (int arg1, SomeDeclType arg2); will it be able to recognize it as a method with 2 arguments ?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sample application

mathias
Administrator
Take a look at the Java parser example, that should be pretty much the console application you are looking for.

> Anyway I am new to PEG parser and my question is whne using it to parse java, would it recognize some piece of code without having the whole file ?

It will recognize whatever content the parsing rule you give it matches.
Take a look at the Java parser source for more guidance.

Cheers,
Mathias

---
[hidden email]
http://www.parboiled.org

On 10.04.2012, at 15:23, smartmobili [via parboiled users] wrote:

> Ok I will try but if you already have a simple console application it would help.
> Anyway I am new to PEG parser and my question is whne using it to parse java, would it recognize some piece of code without having the whole file ?
> For instance when trying antlr I cannot pass just a method declaration, I have to pass the whole file.
> So if I only have something like void foobar (int arg1, SomeDeclType arg2); will it be able to recognize it as a method with 2 arguments ?
>
> If you reply to this email, your message will be added to the discussion below:
> http://users.parboiled.org/Sample-application-tp3899492p3899596.html
> To start a new topic under parboiled users, email [hidden email]
> To unsubscribe from parboiled users, click here.
> NAML

Loading...