Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pattern matching and destructuring??..super noob question #6

Open
cocodrino opened this issue Nov 1, 2014 · 1 comment
Open

pattern matching and destructuring??..super noob question #6

cocodrino opened this issue Nov 1, 2014 · 1 comment

Comments

@cocodrino
Copy link

Hi Eliah, maybe this is a stupid question but I'm just learning about parsers and lexers now, something cool about the scala parser is than I can build a structure of scala objects which I can traverse in a simple way using pattern matching...

for instance the terms in this blog http://www.dontbreakthebuild.com/2013/07/30/basic-parsing-in-scala-using-parsing-combinators/
I can match over Integer(a), Multiplication(a,b)...etc...

I was thinking than would be a solution iterate 2 times, the first one traverse the nodes and build a tree of scala objects and then work with this...but I'm not sure if it's a good approach or there is a better solution

thanks

@Eliah-Lakhin
Copy link
Owner

@cocodrino Hi! That's nice you are using Papa Carlo for learning purposes. I believe it was a good choice to play with various things related to this topic. But what was your question about, actually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants