compilation

How to parse multiple line code using RPLY library?

一世执手 提交于 2021-02-04 08:36:45
问题 I am working on the development of a new language and I am using RPLY library for lexing and parsing purposes. Now I am stuck at getting an error when I use more than one line in the code file. here are my files:- mylexer.py from rply import LexerGenerator class Lexer(): def __init__(self): self.lexer = LexerGenerator() def _add_tokens(self): # Print self.lexer.add('PRINT', r'print') # Parenthesis self.lexer.add('OPEN_PAREN', r'\(') self.lexer.add('CLOSE_PAREN', r'\)') # Semi Colon self.lexer

Use fgsl in fortran: how to compile with gfortran

空扰寡人 提交于 2021-01-29 20:55:35
问题 I am trying to do something basic, but I can't find the relevant information on how to compile. I tried the following without success: gfortran testintegral.f90 -lgsl -lgslcblas testintegral.f90:19.6: use fgsl 1 Fatal Error: Can't open module file 'fgsl.mod' for reading at (1): No such file The file is taken from http://de.wikibooks.org/wiki/Fortran:_FGSL#Beispiel:_Numerische_Integration (page in german but readily understandable) so I suppose it is OK. Maybe the syntax of the compilation

Use fgsl in fortran: how to compile with gfortran

空扰寡人 提交于 2021-01-29 18:36:27
问题 I am trying to do something basic, but I can't find the relevant information on how to compile. I tried the following without success: gfortran testintegral.f90 -lgsl -lgslcblas testintegral.f90:19.6: use fgsl 1 Fatal Error: Can't open module file 'fgsl.mod' for reading at (1): No such file The file is taken from http://de.wikibooks.org/wiki/Fortran:_FGSL#Beispiel:_Numerische_Integration (page in german but readily understandable) so I suppose it is OK. Maybe the syntax of the compilation

How to compile SML using SMLNJ while the code is in Notepad++?

醉酒当歌 提交于 2021-01-29 17:30:45
问题 I'm completely new to SML and I have no idea how to work with anything related to it. I am supposed to use the SMLNJ compiler and I'm currently coding using Notepad++. But how do I compile the program exactly? Do I copy and paste the code in the SMLNJ command line thing? Or is there an environment for SMLNJ I can actually code in and compile my code? PLEASE HELP! 回答1: If by "compile" you mean "compile to a stand-alone executable" -- don't worry about that when first learning the language as a

Cross compiling with arm-linux-gnueabihf

折月煮酒 提交于 2021-01-29 13:21:33
问题 I am quite new to cross compiling. After downloading the arm-linux-gnueabihf tool from arm. I tried to use the binary called arm-linux-gnueabihf-g++ and arm-linux-gnueabihf-gcc to compile my code. My command looks something like: ~/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -Isrc -I/usr/include -std=c++11 -Wall -Wno-unknown-pragmas -O0 -g3 -D__DEBUG_BUILD__ -DDEVELOPMENT -MMD -c -o "Debug/src/BatteryStatus.o" "src/BatteryStatus.cpp" I immediately run into this

Properly link SWF library when compiling Actionscript 3 Air poject using as3mxml

本小妞迷上赌 提交于 2021-01-29 10:06:59
问题 In my attempts to achieve the following: compile library.swf that contains different common scripts; compile different SWFs that link library.swf and use these common scripts without copying code to own resulting SWFs; I was trying to use acompc and mxmlc , however I couldn't achieve the approach above. Recently I came up across as3mxml plugin for Visual Studio Code (VSC) which I gave a try as at least it had some examples. Here is my MVP: Project library that builds library.swf , library.swc

What is the relation between compile time execution of import/use and its scope and dynamics?

拜拜、爱过 提交于 2021-01-29 09:00:31
问题 This question originates from my previous question Why do fully qualified names have to be used when dynamically assessing namespaced elements? and another question Use php namespace inside function. Both of these questions boil down to the following explanation by php.net: Importing is performed at compile-time, and so does not affect dynamic class, function or constant names.... ....The use keyword must be declared in the outermost scope of a file (the global scope) or inside namespace

Makefile to compile all src and generate static library

早过忘川 提交于 2021-01-29 08:31:54
问题 I've got a large-ish C project, and I want to generate a static library from all of my sources in the src/ file using the includes from my include/ path, and some other includes for my RTOS. I have a working set of steps in the line commands that work: gcc src/drivers/* src/packets/* (...more files) -c -I ./include -I ../SatelliteSim/Source/include/ -I ../SatelliteSim/Project/ -I ../SatelliteSim/Source/portable/GCC/POSIX/ -m32 -DDEBUG=1 -g -UUSE_STDIO -D__GCC_POSIX__=1 -pthread then, ar -rsc

R package build failed when checking examples

旧街凉风 提交于 2021-01-29 08:03:52
问题 I am building my R package. However, when compiling it using CMD, the build fails because of the examples. I show you my function header for clarity: #' @param data a dataframe containing the data to be modelled #' @param string identifying the location #' @param parameters a dataframe where the parameters for all the functions needed are saved #' @param period string saying whether the horizon to model #' #' @import dplyr #' #' @return list #' @export #' @examples Runner(data=data,Site="ABC"

GDB compilation fails with MSYS2 under Windows

岁酱吖の 提交于 2021-01-29 08:02:28
问题 I need to compile GDB for OS Linux targets but with Windows host OS. (The goal is to have possibility to run GDB client on Windows and connect it to the gdbserver running on Linux). I'm using GDB sources v 9.2 and the following configure command: ../configure --build=x86_64-w64-mingw64 --target=x86_64-unknown-linux-gnu It's running from the build directory inside gdb golder. And I'm getting the following error: mkdir -p -- nat/.deps CXX gdb.o CXX ada-exp.o ada-exp.y: In function 'int ada