amath
1.8.5
Simple command line calculator
kword.h
Go to the documentation of this file.
1
/*-
2
* Copyright (c) 2014-2018 Carsten Sonne Larsen <cs@innolan.net>
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
*
14
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
*
25
* Generated with FlexCat. For more information, see:
26
* http://sourceforge.net/projects/flexcat/
27
*
28
* Project homepage:
29
* https://amath.innolan.net
30
*
31
*/
32
33
#
ifndef
AMATH_LOCALE_KEYWORD_H
34
#
define
AMATH_LOCALE_KEYWORD_H
35
36
/**
37
* @file loc/kword.h
38
* @brief Keywords used by lexer
39
*/
40
41
#
include
"amath.h"
42
#
include
"amathc.h"
43
#
include
"main/symbol.h"
44
45
/**
46
* @brief Character representation of keyword tied with its symbol
47
*/
48
struct
keyworddef
49
{
50
int
id
;
51
Symbol
symbol
;
52
const
char
*
name
;
53
};
54
55
static
const
keyworddef
keywords
[] = {
56
{ 0,
symclear
,
"clear"
},
57
{ 1,
symdef
,
"def"
},
58
{ 2,
symdelete
,
"delete"
},
59
{ 3,
syme
,
"e"
},
60
{ 4,
symi
,
"i"
},
61
{ 5,
sympi
,
"pi"
},
62
{ 6,
symins
,
"ins"
},
63
{ 7,
symeval
,
"eval"
},
64
{ 8,
symdraw
,
"draw"
},
65
{ 9,
symplot
,
"plot"
},
66
{ 10,
symexecute
,
"execute"
},
67
{ 11,
symexit
,
"exit"
},
68
{ 12,
symexit
,
"quit"
},
69
{ 13,
symstatement
,
"statements"
},
70
{ 14,
symoperator
,
"operators"
},
71
{ 15,
symcomplex
,
"complex"
},
72
{ 16,
symfunction
,
"funcs"
},
73
{ 17,
symfunction
,
"functions"
},
74
{ 18,
symtrigon
,
"trigon"
},
75
{ 19,
symtrigon
,
"trigonometric"
},
76
{ 20,
symhyper
,
"hyper"
},
77
{ 21,
symhyper
,
"hyperbolic"
},
78
{ 22,
symearly
,
"early"
},
79
{ 23,
symhelp
,
"help"
},
80
{ 24,
symprompt
,
"prompt"
},
81
{ 25,
symversion
,
"version"
},
82
{ 26,
symmem
,
"mem"
},
83
{ 27,
symmem
,
"memory"
},
84
{ 28,
symprefs
,
"prefs"
},
85
{ 29,
symprefs
,
"preferences"
},
86
{ 30,
symlist
,
"list"
},
87
{ 31,
symload
,
"load"
},
88
{ 32,
symsave
,
"save"
},
89
{ 33,
symshow
,
"show"
},
90
{ 34,
symvariable
,
"vars"
},
91
{ 35,
symvariable
,
"variables"
},
92
{ 36,
symdigits
,
"digits"
},
93
{ 37,
syminput
,
"input"
},
94
{ 38,
symoutput
,
"output"
},
95
{ 39,
symbin
,
"bin"
},
96
{ 40,
symbin
,
"binary"
},
97
{ 41,
symoct
,
"oct"
},
98
{ 42,
symoct
,
"octal"
},
99
{ 43,
symdec
,
"dec"
},
100
{ 44,
symdec
,
"decimal"
},
101
{ 45,
symhex
,
"hex"
},
102
{ 46,
symhex
,
"hexadecimal"
},
103
{ 47,
symabout
,
"about"
},
104
{ 48,
symlicense
,
"license"
},
105
{ -1, Symbol(0),
EMPTYSTRING
}
106
};
107
108
#
endif
symload
Definition:
symbol.h:84
symoct
Definition:
symbol.h:93
symhyper
Definition:
symbol.h:73
keyworddef::name
const char * name
Definition:
kword.h:52
EMPTYSTRING
#define EMPTYSTRING
Definition:
amath.h:213
symdec
Definition:
symbol.h:90
syme
Definition:
symbol.h:76
symshow
Definition:
symbol.h:82
keyworddef
Character representation of keyword tied with its symbol.
Definition:
kword.h:48
symbin
Definition:
symbol.h:92
symprompt
Definition:
symbol.h:96
symstatement
Definition:
symbol.h:69
symfunction
Definition:
symbol.h:70
keywords
static const keyworddef keywords[]
Definition:
kword.h:55
symins
Definition:
symbol.h:79
syminput
Definition:
symbol.h:87
symlist
Definition:
symbol.h:83
symhex
Definition:
symbol.h:91
symplot
Definition:
symbol.h:98
symsave
Definition:
symbol.h:85
symclear
Definition:
symbol.h:65
symoperator
Definition:
symbol.h:68
keyworddef::symbol
Symbol symbol
Definition:
kword.h:51
symexit
Definition:
symbol.h:67
symearly
Definition:
symbol.h:74
symcomplex
Definition:
symbol.h:75
keyworddef::id
int id
Definition:
kword.h:50
symdraw
Definition:
symbol.h:99
symdelete
Definition:
symbol.h:63
symprefs
Definition:
symbol.h:95
symexecute
Definition:
symbol.h:86
symlicense
Definition:
symbol.h:101
symi
Definition:
symbol.h:78
symabout
Definition:
symbol.h:100
sympi
Definition:
symbol.h:77
symversion
Definition:
symbol.h:97
symeval
Definition:
symbol.h:62
symoutput
Definition:
symbol.h:88
symdigits
Definition:
symbol.h:89
symmem
Definition:
symbol.h:94
symhelp
Definition:
symbol.h:61
symvariable
Definition:
symbol.h:71
symdef
Definition:
symbol.h:66
symtrigon
Definition:
symbol.h:72
src
loc
kword.h
Generated by
1.8.13