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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3561 - (show annotations) (download) (as text)
Fri Aug 23 11:44:00 2019 UTC (4 years, 8 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1459 byte(s)
NKSP: Added standard units support for numbers and final "!" operator:

* NKSP strictness: Variable names, function names and preprocessor condition
  names must start with a regular character (a-z or A-Z); starting them with
  a digit or underscore is no longer allowed.

* NKSP parser fix: equal comparison operator "=" and not equal comparison
  operator "#" must only accept integer operands.

* NKSP language: Implemented support for standard units like Hertz, seconds,
  Bel including support for metric unit prefixes; so one can now e.g.
  conveniently use numbers in scripts like "5us" meaning "5 microseconds",
  or e.g. "12kHz" meaning "12 kilo Hertz", or e.g. "-14mdB" meaning
  "minus 14 Millidecibel", or e.g. "28c" meaning "28 cents" (for tuning).

* NKSP language: Introduced "final" operator "!" which is specifically
  intended for synthesis parameter values to denote that the synthesis
  parameter value is intended to be the "final" value for that synthesis
  parameter that should explicitly be used by the engine and thus causing
  the sampler engine to ignore all other modulation sources for the same
  synthesis parameter (like e.g. LFO, EG); by simply prefixing a value,
  variable or formula with this new "!" operator the expression is marked as
  being "final".

* Bumped version (2.1.1.svn4).

1 /*
2 * Copyright (c) 2014-2019 Christian Schoenebeck
3 *
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
18 #if AC_APPLE_UNIVERSAL_BUILD
19 # include "parser.tab.h"
20 #else
21 # include "parser.h"
22 #endif
23
24 #include "../common/global_private.h"
25
26 struct _YYSTYPE {
27 union {
28 LinuxSampler::vmint iValue;
29 char* sValue;
30 struct {
31 LinuxSampler::vmint iValue;
32 LinuxSampler::MetricPrefix_t prefix[2];
33 LinuxSampler::StdUnit_t unit;
34 } iUnitValue;
35 };
36 LinuxSampler::EventHandlersRef nEventHandlers;
37 LinuxSampler::EventHandlerRef nEventHandler;
38 LinuxSampler::StatementsRef nStatements;
39 LinuxSampler::StatementRef nStatement;
40 LinuxSampler::FunctionCallRef nFunctionCall;
41 LinuxSampler::ArgsRef nArgs;
42 LinuxSampler::ExpressionRef nExpression;
43 LinuxSampler::CaseBranch nCaseBranch;
44 LinuxSampler::CaseBranches nCaseBranches;
45 };
46 #define YYSTYPE _YYSTYPE
47 #define yystype YYSTYPE ///< For backward compatibility.
48 #ifndef YYSTYPE_IS_DECLARED
49 # define YYSTYPE_IS_DECLARED ///< We tell the lexer / parser that we use our own data structure as defined above.
50 #endif
51
52 #endif // LS_INSTRSCRIPTSPARSER_SHARED_H

  ViewVC Help
Powered by ViewVC