Base: Quantity: rename lexer and parser files
Rename files according 7d233dc ("Gui: Rename generated lexer files
to match core naming pattern"). Note that C space errors (space
before tabs, spaces on blank lines, etc.) still need to be fixed
manually after regenerating lexer file.
This commit is contained in:
committed by
Benjamin Nauck
parent
f7c8ce50bc
commit
ed00a6673c
@@ -167,8 +167,8 @@ SET(FreeCADBase_UNITAPI_SRCS
|
||||
Quantity.h
|
||||
Quantity.cpp
|
||||
QuantityPyImp.cpp
|
||||
QuantityParser.l
|
||||
QuantityParser.y
|
||||
Quantity.l
|
||||
Quantity.y
|
||||
Unit.h
|
||||
Unit.cpp
|
||||
UnitPyImp.cpp
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
C:\cygwin\bin\flex.exe -oQuantityLexer.c QuantityParser.l
|
||||
C:\cygwin\bin\bison -oQuantityParser.c QuantityParser.y
|
||||
C:\cygwin\bin\flex.exe -oQuantity.lex.c Quantity.l
|
||||
C:\cygwin\bin\bison -oQuantity.tab.c Quantity.y
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
flex -oQuantityLexer.c < QuantityParser.l
|
||||
bison -oQuantityParser.c QuantityParser.y
|
||||
(cd "$(dirname "$0")" && \
|
||||
flex -oQuantity.lex.c Quantity.l && \
|
||||
bison -oQuantity.tab.c Quantity.y && \
|
||||
sed -i '1s|^|// clang-format off\n|' Quantity.tab.c && \
|
||||
sed -i '1s|^|// clang-format off\n|' Quantity.lex.c \
|
||||
)
|
||||
|
||||
@@ -523,14 +523,14 @@ namespace QuantityParser
|
||||
#define yylex QuantityLexer
|
||||
int QuantityLexer();
|
||||
|
||||
// Parser, defined in QuantityParser.y
|
||||
// Parser, defined in Quantity.y
|
||||
// NOLINTNEXTLINE
|
||||
#include "QuantityParser.c"
|
||||
#include "Quantity.tab.c"
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
// Scanner, defined in QuantityParser.l
|
||||
// Scanner, defined in Quantity.l
|
||||
// NOLINTNEXTLINE
|
||||
#include "QuantityLexer.c"
|
||||
#include "Quantity.lex.c"
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
class StringBufferCleaner
|
||||
|
||||
@@ -21,13 +21,6 @@
|
||||
|
||||
/* Lexer for the FreeCAD Units language */
|
||||
|
||||
/* use this file to generate the file 'QuantityLexer.c' using the program flex
|
||||
* the command for this operation is:
|
||||
* flex --outfile=QuantityLexer.c QuantityParser.l
|
||||
* (flex for Windows is available here:
|
||||
* https://sourceforge.net/projects/winflexbison/
|
||||
* (you must then change 'flex' to 'win_flex' in the command)) */
|
||||
|
||||
/* This disables inclusion of unistd.h, which is not available under Visual C++
|
||||
* on Win32. The C++ scanner uses STL streams instead. */
|
||||
#define YY_NO_UNISTD_H
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,85 +0,0 @@
|
||||
// clang-format off
|
||||
/* A Bison parser, made by GNU Bison 3.0.4. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
under terms of your choice, so long as that work isn't itself a
|
||||
parser generator using the skeleton or a modified version thereof
|
||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
||||
the parser skeleton itself, you may (at your option) remove this
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_YY_QUANTITYPARSER_H_INCLUDED
|
||||
# define YY_YY_QUANTITYPARSER_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
{
|
||||
UNIT = 258,
|
||||
NUM = 259,
|
||||
MINUSSIGN = 260,
|
||||
ACOS = 261,
|
||||
ASIN = 262,
|
||||
ATAN = 263,
|
||||
ATAN2 = 264,
|
||||
COS = 265,
|
||||
EXP = 266,
|
||||
ABS = 267,
|
||||
MOD = 268,
|
||||
LOG = 269,
|
||||
LOG10 = 270,
|
||||
POW = 271,
|
||||
SIN = 272,
|
||||
SINH = 273,
|
||||
TAN = 274,
|
||||
TANH = 275,
|
||||
SQRT = 276,
|
||||
NEG = 277
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
int yyparse (void);
|
||||
|
||||
#endif /* !YY_YY_QUANTITYPARSER_H_INCLUDED */
|
||||
// clang-format on
|
||||
Reference in New Issue
Block a user