Patch from James Morrison
* treelang.texi (What is GNU Treelang?): Fix a typo. (Lexical Syntax): Create an itemize list of keywords. Add commas to paragraph defining names. From-SVN: r74310
This commit is contained in:
parent
e3869806bb
commit
d15ae5d695
|
@ -1,3 +1,9 @@
|
||||||
|
2003-12-04 James A. Morrison <ja2morri@uwaterloo.ca>
|
||||||
|
|
||||||
|
* treelang.texi (What is GNU Treelang?): Fix a typo.
|
||||||
|
(Lexical Syntax): Create an itemize list of keywords. Add commas to
|
||||||
|
paragraph defining names.
|
||||||
|
|
||||||
2003-11-26 Jason Merrill <jason@redhat.com>
|
2003-11-26 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
* Make-lang.in (treelang.tags): Create TAGS.sub files in each
|
* Make-lang.in (treelang.tags): Create TAGS.sub files in each
|
||||||
|
|
|
@ -370,7 +370,7 @@ double_plus_one
|
||||||
@{
|
@{
|
||||||
// aaa is a variable, of type integer and allocated at the start of the function
|
// aaa is a variable, of type integer and allocated at the start of the function
|
||||||
automatic int aaa;
|
automatic int aaa;
|
||||||
// set aaa to the value returned from aaa, when passed arg7 and arg7 as the two parameters
|
// set aaa to the value returned from add, when passed arg7 and arg7 as the two parameters
|
||||||
aaa=add(arg7, arg7);
|
aaa=add(arg7, arg7);
|
||||||
aaa=add(aaa, aaa);
|
aaa=add(aaa, aaa);
|
||||||
aaa=subtract(subtract(aaa, arg7), arg7) + 1;
|
aaa=subtract(subtract(aaa, arg7), arg7) + 1;
|
||||||
|
@ -419,38 +419,58 @@ x=1; // Set X to 1
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Keywords consist of any reserved words or symbols as described
|
Keywords consist of any of the following reserved words or symbols:
|
||||||
later. The list of keywords follows:
|
|
||||||
|
|
||||||
@smallexample
|
@itemize @bullet
|
||||||
@{ - used to start the statements in a function
|
@item @{
|
||||||
@} - used to end the statements in a function
|
used to start the statements in a function
|
||||||
( - start list of function arguments, or to change the precedence of operators in an expression
|
@item @}
|
||||||
) - end list or prioritized operators in expression
|
used to end the statements in a function
|
||||||
, - used to separate parameters in a function prototype or in a function call
|
@item (
|
||||||
; - used to end a statement
|
start list of function arguments, or to change the precedence of operators in an expression
|
||||||
+ - addition
|
@item )
|
||||||
- - subtraction
|
end list or prioritized operators in expression
|
||||||
= - assignment
|
@item ,
|
||||||
== - equality test
|
used to separate parameters in a function prototype or in a function call
|
||||||
if - begin IF statement
|
@item ;
|
||||||
else - begin 'else' portion of IF statement
|
used to end a statement
|
||||||
static - indicate variable is permanent, or function has file scope only
|
@item +
|
||||||
automatic - indicate that variable is allocated for the life of the function
|
addition
|
||||||
external_reference - indicate that variable or function is defined in another file
|
@item -
|
||||||
external_definition - indicate that variable or function is to be accessible from other files
|
subtraction
|
||||||
int - variable is an integer (same as C int)
|
@item =
|
||||||
char - variable is a character (same as C char)
|
assignment
|
||||||
unsigned - variable is unsigned. If this is not present, the variable is signed
|
@item ==
|
||||||
return - start function return statement
|
equality test
|
||||||
void - used as function type to indicate function returns nothing
|
@item if
|
||||||
@end smallexample
|
begin IF statement
|
||||||
|
@item else
|
||||||
|
begin 'else' portion of IF statement
|
||||||
|
@item static
|
||||||
|
indicate variable is permanent, or function has file scope only
|
||||||
|
@item automatic
|
||||||
|
indicate that variable is allocated for the life of the function
|
||||||
|
@item external_reference
|
||||||
|
indicate that variable or function is defined in another file
|
||||||
|
@item external_definition
|
||||||
|
indicate that variable or function is to be accessible from other files
|
||||||
|
@item int
|
||||||
|
variable is an integer (same as C int)
|
||||||
|
@item char
|
||||||
|
variable is a character (same as C char)
|
||||||
|
@item unsigned
|
||||||
|
variable is unsigned. If this is not present, the variable is signed
|
||||||
|
@item return
|
||||||
|
start function return statement
|
||||||
|
@item void
|
||||||
|
used as function type to indicate function returns nothing
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Names consist of any letter or "_" followed by any number of letters or
|
Names consist of any letter or "_" followed by any number of letters,
|
||||||
numbers or "_". "$" is not allowed in a name. All names must be globally
|
numbers, or "_". "$" is not allowed in a name. All names must be globally
|
||||||
unique - the same name may not be used twice in any context - and must
|
unique, i.e. may not be used twice in any context, and must
|
||||||
not be a keyword. Names and keywords are case sensitive. For example:
|
not be a keyword. Names and keywords are case sensitive. For example:
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
|
|
Loading…
Reference in New Issue