Difference between revisions of "SCI Parser Programmer's Reference/Said Syntax"

From SCI Wiki
Jump to navigationJump to search
(Created page with "Official SCI Documentation<br /> <div align="center"> Chapter: 1 | SCI Parser Programmer's Reference/User Parse Tre...")
 
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
[[SCI Parser Programmer's Reference/User Parse Trees|2]] |  
 
[[SCI Parser Programmer's Reference/User Parse Trees|2]] |  
 
[[SCI Parser Programmer's Reference/Said Specs|3]] |  
 
[[SCI Parser Programmer's Reference/Said Specs|3]] |  
[[SCI Parser Programmer's Reference/Syntax|4]] |  
+
[[SCI Parser Programmer's Reference/Said Syntax|4]] |  
[[SCI Parser Programmer's Reference/Spec Trees|5]] |  
+
[[SCI Parser Programmer's Reference/Said Spec Trees|5]] |  
 
[[SCI Parser Programmer's Reference/Tree Matching|6]] |  
 
[[SCI Parser Programmer's Reference/Tree Matching|6]] |  
 
[[SCI Parser Programmer's Reference/Examples|7]] |  
 
[[SCI Parser Programmer's Reference/Examples|7]] |  
Line 13: Line 13:
 
</div><br />
 
</div><br />
  
<div align="center"><span style="font-size: 22pt">Syntax</span><br />
+
<div align="center"><span style="font-size: 22pt">Said Syntax</span><br />
 
''Author: [[Pablo Ghenis]]''<br />
 
''Author: [[Pablo Ghenis]]''<br />
 
''Date: 21 July 1988 9:56:56 am''</div>
 
''Date: 21 July 1988 9:56:56 am''</div>
Line 19: Line 19:
 
&nbsp;
 
&nbsp;
  
-- content here --
+
==<br /> Said syntax ==
 +
 
 +
Said-specs are written in a sub-language with its own syntax and operators to produce expressions not unlike those we use for arithmetic.
 +
 
 +
The main concept implemented by the "Said-er" is:
 +
 +
===<br /> VERB/DIRECT OBJECT/INDIRECT OBJECT ===
 +
 
 +
Note that the slash is a part of the description of a dobj or iobj, not a detached separator.
 +
 
 +
Each part can be made OPTIONAL by enclosing it in brackets. This is also true for any subpart. Thus 'look [ /rock ]' means a phrase with verb 'look' and an optional direct object that should be 'rock' if present. Note that the slash is INSIDE the brackets.
 +
 
 +
===<br /> MODIFIERS: ===
 +
 
 +
Signaled using "<", a given root can have multiple modifiers as in "sit down on bed" which can be specified by 'sit<down<on/bed' since the two prepositions are modifiers to the verb.
 +
 
 +
In general, adverbs and prepositions modify verbs, adjectives modify nouns or other adjectives and nouns modify other nouns.
 +
 
 +
===<br /> ALTERNATIVES: ===
 +
 +
Let's say we want to respond the same way to either
 +
"start the car" and
 +
"turn on the car"
 +
this can be done with OR alternatives:
 +
'start,(turn<on)/car'
 +
 
 +
The comma means "OR". Notice the parenthesis surrounding turn<on; they are required because "," has higher PRECEDENCE than "<". This is just like common arithmetic expressions, as in 2*3+4 versus 2*(3+4) where the parenthesis make the difference between  getting 10 or 14 because "*" has higher precedence than "+"
  
 
&nbsp;
 
&nbsp;
Line 33: Line 59:
  
 
<span style="float: left">[[SCI Parser Programmer's Reference/Said Specs|&lt; Previous: Said Specs]]</span>
 
<span style="float: left">[[SCI Parser Programmer's Reference/Said Specs|&lt; Previous: Said Specs]]</span>
<span style="float: right">[[SCI Parser Programmer's Reference/Spec Trees|Next: Spec Trees &gt;]]</span>
+
<span style="float: right">[[SCI Parser Programmer's Reference/Said Spec Trees|Next: Said Spec Trees &gt;]]</span>
  
 
&nbsp;
 
&nbsp;

Latest revision as of 02:27, 22 December 2015

Official SCI Documentation

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | Index


Said Syntax

Author: Pablo Ghenis

Date: 21 July 1988 9:56:56 am

 


Said syntax

Said-specs are written in a sub-language with its own syntax and operators to produce expressions not unlike those we use for arithmetic.

The main concept implemented by the "Said-er" is:


VERB/DIRECT OBJECT/INDIRECT OBJECT

Note that the slash is a part of the description of a dobj or iobj, not a detached separator.

Each part can be made OPTIONAL by enclosing it in brackets. This is also true for any subpart. Thus 'look [ /rock ]' means a phrase with verb 'look' and an optional direct object that should be 'rock' if present. Note that the slash is INSIDE the brackets.


MODIFIERS:

Signaled using "<", a given root can have multiple modifiers as in "sit down on bed" which can be specified by 'sit<down<on/bed' since the two prepositions are modifiers to the verb.

In general, adverbs and prepositions modify verbs, adjectives modify nouns or other adjectives and nouns modify other nouns.


ALTERNATIVES:

Let's say we want to respond the same way to either "start the car" and "turn on the car" this can be done with OR alternatives: 'start,(turn<on)/car'

The comma means "OR". Notice the parenthesis surrounding turn<on; they are required because "," has higher PRECEDENCE than "<". This is just like common arithmetic expressions, as in 2*3+4 versus 2*(3+4) where the parenthesis make the difference between getting 10 or 14 because "*" has higher precedence than "+"

 

Notes


 

Table of Contents

 

< Previous: Said Specs Next: Said Spec Trees >