Logtalk 2.17.2 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1076 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.17.1
|
||||
Release 2.17.2
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example consult the dcgs.loader
|
||||
utility file (note that this is a Prolog file).
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
This folder contains the following examples of using DCGs inside
|
||||
objects and categories:
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.17.1
|
||||
Release 2.17.2
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
...
|
||||
|
||||
|
||||
% DCG rules implementing a simple calculator:
|
||||
|
||||
| ?- calculator::parse("1+2-3*4", Result).
|
||||
|
||||
16
Logtalk/examples/dcgs/loader.lgt
Normal file
16
Logtalk/examples/dcgs/loader.lgt
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
parsep,
|
||||
calculator,
|
||||
parsetree,
|
||||
determiners,
|
||||
nouns,
|
||||
verbs,
|
||||
sentence,
|
||||
url,
|
||||
xml,
|
||||
shell,
|
||||
walker,
|
||||
bom,
|
||||
faa])).
|
||||
Reference in New Issue
Block a user