|
Revision 1, 1.1 kB
(checked in by gnue, 4 years ago)
|
|
import project
|
| Line | |
|---|
| 1 | �g�����C�u���� |
|---|
| 2 | ------------- |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | ��protoFILE |
|---|
| 6 | |
|---|
| 7 | �@���F�t�@�C�����@�g�p�� |
|---|
| 8 | |
|---|
| 9 | �@�@//�g�����C�u�����̗v�� |
|---|
| 10 | �@�@Require("protoFILE"); |
|---|
| 11 | |
|---|
| 12 | �@�@//�t���[���̍쐬 |
|---|
| 13 | �@�@file := {_proto: @protoFILE}; |
|---|
| 14 | �@�@//�I�[�v��(mode ��man fopen ��Ɓj |
|---|
| 15 | �@�@file:open(path, mode); |
|---|
| 16 | |
|---|
| 17 | �@�@//�o���@�@file:print(str); |
|---|
| 18 | �@�@//�P�s���@line := file:gets(); |
|---|
| 19 | �@�@//�o�C�i�����@binary := file:read(len); |
|---|
| 20 | �@�@//EOF �̃`�F�b�N |
|---|
| 21 | �@�@file:eof(); |
|---|
| 22 | �@�@//�V�[�N |
|---|
| 23 | �@�@file:seek(offset, whence); // whence: 'set, 'curr or 'end |
|---|
| 24 | �@�@//�t�@�C���|�C���^�̎擾 |
|---|
| 25 | �@�@file:tell(); |
|---|
| 26 | �@�@//�t�@�C���|�C���^���ɖ߂� |
|---|
| 27 | �@�@file:rewind(); |
|---|
| 28 | |
|---|
| 29 | �@�@//�N���[�Y |
|---|
| 30 | �@�@file:close(); |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | ��protoREGEX |
|---|
| 34 | |
|---|
| 35 | �@���F���K�\�� |
|---|
| 36 | �@�g�p�� |
|---|
| 37 | |
|---|
| 38 | �@�@//�g�����C�u�����̗v�� |
|---|
| 39 | �@�@Require("protoREGEX"); |
|---|
| 40 | |
|---|
| 41 | �@�@//���K�\���I�u�W�F�N�g�̍쐬 |
|---|
| 42 | �@�@// �g�p�ł��鐳�K�\����man regex ����@�@// �I�v�V������i ��m ���g�p�\ |
|---|
| 43 | �@�@reg := /���K�\���̃p�^�[��/�I�v�V����; |
|---|
| 44 | |
|---|
| 45 | �@�@//�p�^�[���}�b�`�̎�s |
|---|
| 46 | �@�@// str �c�@����ۂ̕������@// �߂� nil �c ���s |
|---|
| 47 | �@�@// �߂� �z�� ����}�b�`�������������z��v�f�ɓ��@�@matchs = reg:match(str); |
|---|
| 48 | |
|---|
| 49 | �@�@//�����iNewtonScript �Ƀf�X�g���N�^���Ȃ����߁j |
|---|
| 50 | �@�@reg:cleanup(); |
|---|