Hi Nick,
That is great that you are interested in taking a principled approach to
developing the file I/O semantics for LOLCODE! The current way of doing things
is quite hacked together.
I think the syntax you are using was from an old proposal. What is currently
implemented in the future branch on lci (at
https://github.com/justinmeza/lci/tree/future) uses some of the features of
BUKKITs in the 1.3 spec, and works like this (assuming the file is called
"libtest.lol", it opens itself, reads and prints its first 7 bytes, "HAI 1.3",
and closes itself):
HAI 1.3
CAN HAS STDIO?
I HAS A file
file R I IZ STDIO'Z FOPENIN YR "libtest.lol" AN YR "r" MKAY
I HAS A str ITZ I IZ STDIO'Z FREADIN YR file AN YR 7 MKAY
VISIBLE str
I IZ STDIO'Z FCLOSIN YR file MKAY
KTHXBYE
If you want to play around with the grammar, you can change the tokenizer and
parser files. Most of the code that handles file I/O is in the binding source
code files.
- Justin
> --
> You received this message because you are subscribed to the Google Groups "lci-general" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
lci-general...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>