You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey I'm currently trying to compile the example code om my Linux (Manjaro)
I have altered the 'end' in the .fsy file since this coursed a rejection at compile time because it is a keyword.
I then try to compile the code once more.
it then give a lot of error messages back, but the two I think are the root of the rest, is that it can't find FSharp.Text.Lexing and FSharp.Text.Parsing
/../Parser.fs(4,18): error FS0039: The namespace 'Lexing' is not defined.
/../Parser.fs(5,18): error FS0039: The namespace 'Parsing' is not defined.
/../Parser.fs(80,40): error FS0039: The type 'Parsing' is not defined.
My MakeFile looks like this
.PHONY: all clean
fsl = fslex
fsp = fsyacc
fsc = fsharpc --nologo
Program = Program.exe
LexerGen = Lexer.fs
ParserGen = Parser.fs
Hello, is there a particular reason why you use Makefiles? Building code in .NET is a much more complex process than simply calling the language's compiler, and doing it with make is an unsupported and extremely unusual and counterproductive occurrence.
How to fix the issue? Create an F# project either with Visual Studio or the dotnet CLI tool, and install the FsLexYacc and FsLexYacc.Runtime NuGet packages. In your Makefile you call the compiler once for the parser and once for the lexer, but it would be much easier for you if they were on the same project.
Hey I'm currently trying to compile the example code om my Linux (Manjaro)
I have altered the 'end' in the .fsy file since this coursed a rejection at compile time because it is a keyword.
I then try to compile the code once more.
it then give a lot of error messages back, but the two I think are the root of the rest, is that it can't find FSharp.Text.Lexing and FSharp.Text.Parsing
/../Parser.fs(4,18): error FS0039: The namespace 'Lexing' is not defined.
/../Parser.fs(5,18): error FS0039: The namespace 'Parsing' is not defined.
/../Parser.fs(80,40): error FS0039: The type 'Parsing' is not defined.
My MakeFile looks like this
.PHONY: all clean
fsl = fslex
fsp = fsyacc
fsc = fsharpc --nologo
Program = Program.exe
LexerGen = Lexer.fs
ParserGen = Parser.fs
Parser = Parser.dll
Lexer = Lexer.dll
all: $(Program)
$(LexerGen): Lexer.fsl
$(fsl) Lexer.fsl -o $ (LexerGen)
$(ParserGen): Parser.fsy
$(fsp) -v --module Parser Parser.fsy -o $ (ParserGen)
and the code are the same as in the lexer, parser and program given on this site
The text was updated successfully, but these errors were encountered: