Hi Haroldo,
MSE is used for inter-change, and it is typically useful when the parser is external to
Moose. In that case, the external parser creates an MSE file with a model (typically a
FAMIX model) and then load only the MSE file into Moose.
But, if you want to build the parser using PetitParser, you will not need the intermediary
format because you will get the model directly into Moose.
The size of the model rather depends on the operating system you are using. If you use a
Linux or Mac, you should be safe up to a couple millions objects.
Cheers,
Doru
On Feb 21, 2013, at 7:32 AM, Haroldo Stenger <haroldo.stenger(a)gmail.com> wrote:
I'm reading the part of the moose book that
teaches how to write a parser.
I need to write such a parser.
I have a system written in a proprietary language, for which there are no external
parsers unless I write one.
I have a huge file (28MB , 1.5 million lines) which resembles in format a XML file, but
it's not really XML, but a variation in tagging program elements.
Should I partition the huge file in smaller units before trying to run a MSE parser on
it?
Or should the huge grammar parser work?
I can approach any of the two paths.
I think that once everything is inside the meta-model (which I'll have to write too
later) , it is of little importance if the data came from a huge file , or if it came from
two thousand smaller files. Am I right?
How big a model can get?
Hope this helps helping me :-)
Additionally, the semantics of the proprietary language I'm trying to parse is
procedural. It's not object oriented.
One of my goals, is to reegineer the procedural code so that it can be abstracted, and
made object oriented in some other open source language, like, say, python, or whichever
fits. That would involve a 'writer' from the transformations on the model, which
is fine.
The transformations on the model might rely on some already existent tools in moose, as
well as on hand-made tools adapted to the idiosyncracies of this language.
I'm looking for general help on this big picture process. I'm willing to deal
with the details myself, and ask for help if I get stuck :-)
best wishes
Haroldo
2013/2/21 Haroldo Stenger <haroldo.stenger(a)gmail.com>
hi again !
2013/2/19 Ben Coman <btc(a)openinworld.com>
1. At
http://www.moosetechnology.org/download
2. Download moose 4.7 'moose.zip' file. Unzip this to any folder XXX and you see
three files.
a. moose.image - is the smalltalk program, including pharo & moose additions
b. moose.changes - is like a transaction log - it records changes in method source so
that if the image crashes before you save it, you can roll forward changes from the last
save.
c. moose.st - actually I don't know what this does. I've never had to do
anything with it directly.
3. Follow the link through to
http://www.pharo-project.org/pharo-download
Under 'Virtual Machines' choose Cog-linux.zip - which will download
nbcog-linux-latest.zip. This is the CogVM with a few extensions named NativeBoost for
calling out to C libraries.
Drag the entire contents of the VM zip file into the same XXX folder as the image.
4. From your other Pharo installation, find the PharoV10.sources file and also drop that
into the XXX folder.
5. Now on Windows I would just double-click NBCogVM.exe. You should be able to determine
what to do on Linux from looking at the Moose.sh file from the Moose-4.6-One-Click.
hope that helps smooth the way,
I'm running moose ! I'm happy I could reach this point. Your tutorial works
great.
Now I'll need to grasp the basics in here. I'll be googling and navigating the
moose site. Anyway, would you like to further soomth my way , feel free to :-)
thank you very much
Haroldo
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"When people care, great things can happen."