Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lutin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
verimag
synchrone
lutin
Commits
22687bec
Commit
22687bec
authored
Jul 26, 2019
by
erwan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc: add a section describing quickly the use of 'nor', '#', and n-ary xor
parent
ec5a638d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
doc/lutin-man/language.tex
doc/lutin-man/language.tex
+24
-0
doc/lutin-man/lutin-man.pdf
doc/lutin-man/lutin-man.pdf
+0
-0
doc/lutin-man/tokens
doc/lutin-man/tokens
+3
-0
lutin/src/lutParser.mly
lutin/src/lutParser.mly
+2
-2
No files found.
doc/lutin-man/language.tex
View file @
22687bec
...
...
@@ -631,6 +631,30 @@ declare in the combinator profile that it is a reference using the
Another example of the use of reference variables is given in
Section~
\ref
{
up-and-down
}
.
\subsubsection
{
Pre-defined combinators: nor, xor, and
\#
}
\label
{
Pre-defined-combinators
}
Some useful combinators are predefined to state that, among a list of
Boolean expressions:
\begin{itemize}
\item
none is true (
\key
{
not
}
)
\item
exactly one is true (
\key
{
xor
}
)
\item
exactly zero or one is true (
\key
{
\#
}
)
\end{itemize}
\begin{example}
\begin{program}
\key
{
node
}
N()
\key
{
returns
}
(
\key
{
x,y,t
}
:bool) =
\\
\{
\\
|
\key
{
nor
}
(x,y,z) or
\key
{
xor
}
(x,y,z)
\\
|
\#
(x,y,t) -- actually equivalent to the previous line
\\
\}
\end{program}
\end{example}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection
{
Calling external code
}
...
...
doc/lutin-man/lutin-man.pdf
View file @
22687bec
No preview for this file type
doc/lutin-man/tokens
View file @
22687bec
...
...
@@ -57,7 +57,10 @@ TK_OPEN_PAR (
TK_CLOSE_PAR )
TK_NOT not
TK_OR or
TK_NOR nor
TK_XOR xor
TK_NXOR xor
TK_DIESE #
TK_AND and
TK_IMPL =>
TK_ARROW ->
...
...
lutin/src/lutParser.mly
View file @
22687bec
...
...
@@ -875,7 +875,7 @@ lutBinExp:
|
lutExp
TK_LTE
lutExp
{
make_val_exp
(
CALL_n
(
flagit
"lte"
$
2
,
[
$
1
;
$
3
]))
$
2
}
|
lutExp
TK_GT
lutExp
{
make_val_exp
(
CALL_n
(
flagit
"gt"
$
2
,
[
$
1
;
$
3
]))
$
2
}
|
lutExp
TK_GTE
lutExp
{
make_val_exp
(
CALL_n
(
flagit
"gte"
$
2
,
[
$
1
;
$
3
]))
$
2
}
;
lutNaryExp
:
/*
n
-
ary
*/
|
TK_DIESE
TK_OPEN_PAR
lutExpList
TK_CLOSE_PAR
...
...
@@ -884,7 +884,7 @@ lutNaryExp:
{
make_val_exp
(
CALL_n
(
flagit
"nor"
$
1
,
(
List
.
rev
$
3
)))
$
1
}
|
TK_XOR
TK_OPEN_PAR
lutExpList
TK_CLOSE_PAR
{
make_val_exp
(
CALL_n
(
flagit
"nxor"
$
1
,
(
List
.
rev
$
3
)))
$
1
}
;
lutExpList
:
/*
empty
*/
{
[]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment