golang - antlr - char_stream.go does not implement FromFileName - go

FileStream is deprecated in favor of CharStream,
But in the Go runtime using CharStream.FromFileName(...) results in
antlr.CharStream.FromFileName undefined (type "github.com/antlr/antlr4/runtime/Go/antlr".CharStream has no field or method FromFileName)
Checking the source I can see the char_stream.go does not implement/expose the FromFileName method...
While using NewFileStream(...) results in
cannot use file (variable of type *"github.com/antlr/antlr4/runtime/Go/antlr".FileStream) as type "github.com/antlr/antlr4/runtime/Go/antlr/v4".CharStream in argument to NewralfLexer:
What is the correct way to read in a file in this case?

Related

Unable to use DialPipe in package go-winio

In my code I imported a package "github.com/Microsoft/go-winio"
And when ever I try to call winio.DialPipe It says DialPipe not declared by winio
I want to access named pipe in windows
I am using MacOs(M1) to code.
I tried reading the microsoft implementation and there I can find they have delared DialPipe in a file named pipe.go. What should I do in this situation??

gsoap adding "custom/chrono_time_point.h" "WARNING": missing ';' or invalid type specified

after uncommenting in typemap.dat the following line:
xsd__dateTime = #import "custom/chrono_time_point.h" | xsd__dateTime
I run wsdl2h and everything is fine..
but later in soapcpp2 I'm getting the following warning:
custom/chrono_time_point.h(70): *WARNING*: invalid type specified (missing ';' or type name used as non-type identifier?)
what is this?
Edit
I use gsoap windows from vcpkg.
You do not need to #include "custom/chrono_time_point.h" in your code base after adding that line to your typemap.dat. Adding this line suffices to use std::chrono::system_clock::time_point for XML xsd:dateTime values.
Note that #import custom/chrono_time_point.h is used by soapcpp2 to register the std::chrono::system_clock::time_point serializer.
The serialization implementation is custom/chrono_time_point.cpp which should also be compiled together with the project.

Vagrant outputs loads of Ruby warnings

vagrant outputs warnings like these:
NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01.
Gem::Specification.default_specifications_dir called from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:428.
NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01.
Gem::Specification.default_specifications_dir called from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/bundler.rb:428.
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/kernel_v2/config/vm.rb:354: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/kernel_v2/config/vm_provisioner.rb:92: warning: The called method `add_config' is defined here
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/errors.rb:103: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/i18n-1.8.2/lib/i18n.rb:195: warning: The called method `t' is defined here
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/ui.rb:171: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/ui.rb:223: warning: The called method `say' is defined here
They seem to be internal vagrant warnings and not about my use of vagrant.
The amount of warnings is around 10x the output of vagrant itself. This makes it harder to see the output from vagrant.
Is there a way I can get rid of those?
I removed ubuntu repo version (2.2.6) and using latest vagrant version (i.e. 2.2.9) solved the issue

int8 header file not found during compilation

Trying to compile a simple c program and get error.
In file included from /opt/local/lib/gcc47/gcc/x86_64-apple- darwin13/4.7.3/include/stdint.h:3:0,
from ecl/config.h:134,
from ecl/ecl.h:35,
from main.c:2:
/opt/local/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
What is this error and how can I fix it? From what I gather int8 etc. is typedefined in stdint.h but there's no mention of it in types.h or _types.h. Do I just add these definitions in there or... really lost here.
You have to install IBM® Informix® ESQL/C.
The following BIGINT functionality is available only to users of IBM® Informix® ESQL/C. To use these functions, ESQL/C users will need to manually link their C code to the ESQL/C libraries.
Ref - https://www.ibm.com/docs/en/rbd/9.5.1?topic=libraries-bigint-functions-c
and https://www.ibm.com/docs/en/informix-servers/14.10?topic=programming-esqlc-header-files

Using STL within the Mac 10.5 SDK

Hopefully this is more relevant to StackOverflow than mac.stackexchange...
I am using ARToolkit for an augmented reality project, and in order to make it work under Mac I need to run the 10.5 SDK.
My problem is that I cannot seem to include any of the STL header files...especially vector.
Is there any sort of wrapper or workaround that I can use? I am basically compiling straight C code, and would like to make use of some of the nicer features of the STL framework to speed up development...
Edit:
In closer inspection, it appears that ARToolkit is including std_vector at some point in its include path.
Error snippet:
Bits/c++allocator.h: No such file or directory
Expected template-name before '<' token
Expected `{' before '<' token
Expected unqualified-id before '<' token
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/iosfwd
Bits/c++locale.h: No such file or directory
Bits/c++io.h: No such file or directory
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h
Bits/c++config.h: No such file or directory
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_vector.h
Expected type-specifier before 'allocator'
Expected '>' before 'allocator'
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
'input_iterator_tag' has not been declared
'forward_iterator_tag' has not been declared
There are no arguments to '__N' that depend on a template parameter, so a declaration of '__N' must be available
(if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
Expected nested-name-specifier before 'iterator_traits'
Expected initializer before '<' token
There are no arguments to '_IterCategory' that depend on a template parameter, so a declaration of '_IterCategory' must be available
/Users/espais/research/artoolkit/trunk/artoolkit/examples/newproject/newproject.cpp
Expected `}' at end of input
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1/bits/stl_bvector.h
Expected template-name before '<' token
Expected `{' before '<' token
Expected unqualified-id before '<' token
You might need to make your file a .mm file (Objective-C++) instead of .m (Objective-C).
Other than that, there shouldn't be any trouble doing #include <vector>.
Basically, there was some trickery that had to be done behind the scenes.
I had to update my local SDK (turns out that ARToolkit does support newer versions, regardless of what THEIR documentation says), and then the STL libraries worked.

Resources