/[svn]/linuxsampler/trunk/src/scriptvm/parser_shared.h
ViewVC logotype

Annotation of /linuxsampler/trunk/src/scriptvm/parser_shared.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3573 - (hide annotations) (download) (as text)
Tue Aug 27 21:36:53 2019 UTC (4 years, 8 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1672 byte(s)
NKSP: Introducing floating point support.

* NKSP language: Added support for NKSP real number literals and
  arithmetic operations on them (e.g. "(3.9 + 2.9) / 12.3 - 42.0").

* NKSP language: Added support for NKSP real number (floating point)
  script variables (declare ~foo := 3.4).

* NKSP language: Added support for NKSP real number (floating point)
  array script variables (declare ?foo[3] := ( 1.1, 2.7, 49.0 )).

* NKSP built-in script function "message()" accepts now real number
  argument as well.

* Added built-in NKSP script function "real_to_int()" and its short
  hand form "int()" for casting from real number to integer in NKSP
  scripts.

* Added built-in NKSP script function "int_to_real()" and its short
  hand form "real()" for casting from integer to real number in NKSP
  scripts.

* Bumped version (2.1.1.svn6).

1 schoenebeck 2581 /*
2 schoenebeck 3557 * Copyright (c) 2014-2019 Christian Schoenebeck
3 schoenebeck 2581 *
4     * http://www.linuxsampler.org
5     *
6     * This file is part of LinuxSampler and released under the same terms.
7     * See README file for details.
8     */
9    
10     // types shared between auto generated lexer and parser ...
11    
12     #ifndef LS_INSTRSCRIPTSPARSER_SHARED_H
13     #define LS_INSTRSCRIPTSPARSER_SHARED_H
14    
15     #include <stdio.h>
16     #include "tree.h"
17 schoenebeck 3052
18     #if AC_APPLE_UNIVERSAL_BUILD
19     # include "parser.tab.h"
20     #else
21     # include "parser.h"
22     #endif
23    
24 schoenebeck 2581 #include "../common/global_private.h"
25    
26     struct _YYSTYPE {
27     union {
28 schoenebeck 3557 LinuxSampler::vmint iValue;
29 schoenebeck 3573 LinuxSampler::vmfloat fValue;
30 schoenebeck 2581 char* sValue;
31 schoenebeck 3561 struct {
32     LinuxSampler::vmint iValue;
33     LinuxSampler::MetricPrefix_t prefix[2];
34     LinuxSampler::StdUnit_t unit;
35     } iUnitValue;
36 schoenebeck 3573 struct {
37     LinuxSampler::vmfloat fValue;
38     LinuxSampler::MetricPrefix_t prefix[2];
39     LinuxSampler::StdUnit_t unit;
40     } fUnitValue;
41 schoenebeck 2581 };
42     LinuxSampler::EventHandlersRef nEventHandlers;
43     LinuxSampler::EventHandlerRef nEventHandler;
44     LinuxSampler::StatementsRef nStatements;
45     LinuxSampler::StatementRef nStatement;
46     LinuxSampler::FunctionCallRef nFunctionCall;
47     LinuxSampler::ArgsRef nArgs;
48     LinuxSampler::ExpressionRef nExpression;
49     LinuxSampler::CaseBranch nCaseBranch;
50     LinuxSampler::CaseBranches nCaseBranches;
51     };
52     #define YYSTYPE _YYSTYPE
53     #define yystype YYSTYPE ///< For backward compatibility.
54 schoenebeck 3054 #ifndef YYSTYPE_IS_DECLARED
55     # define YYSTYPE_IS_DECLARED ///< We tell the lexer / parser that we use our own data structure as defined above.
56     #endif
57 schoenebeck 2581
58     #endif // LS_INSTRSCRIPTSPARSER_SHARED_H

  ViewVC Help
Powered by ViewVC