If you are asking "how do I parse a file that contains some structure that
is repeating?" Then ... You just need a rule that says that.. For example :

rule(:line){ ... something ... }
rule(:doc){ line.repeat }

If you want to know how to parse several files... You just need a loop
through the filenames, opening each file, and ask the parser to parse it...
Then parse the next one.

Does this make sense?
 On 9 May 2014 05:45, "Torsten Ruger" <[email protected]> wrote:

> Moi,
>
> as i am relatively new, i feel i am missing the obvious. Sorry for the
> inconvenience if that is so.
>
> I want to parse a file in bits as it were. So when i call parse (or
> whatever) i want it to return the expression, which i then transform and
> process.
> Then i want to parse more of the same file and repeat.
>
> Seems quite a simple thing, but i can't find any info on it.
>
> I would give my grammar as example, but feel that the issue is the same
> for the simples things, ie numbers.So
> 1
> 2
> 3
> could be my file and the rule would be match digit.
>
> Thanks for any help,
>
> AND THANKS FOR PARSLET
>
> Torsten
>

Reply via email to