This repository was archived by the owner on Jul 26, 2018. It is now read-only.
adding c++ support and adding yyinit/yydeinit to fix memory leaks#1
Open
onnlucky wants to merge 2 commits intoooc-lang:masterfrom
Open
adding c++ support and adding yyinit/yydeinit to fix memory leaks#1onnlucky wants to merge 2 commits intoooc-lang:masterfrom
onnlucky wants to merge 2 commits intoooc-lang:masterfrom
Conversation
implicit void casting not allowed add const to yymatchString
fixes memory leaks add make test to build sample and fix sample using new init/deinit updated greg.g and greg.c
Member
|
Hey, awesome :) Merging right now, I've been using it lately and it's great to see some support :) |
|
One of the biggest issue around C++ is G->vals is using malloc/realloc/free. |
|
Without switching to vector or some containers, you can't use STL containers as YYSTYPE. |
Member
|
@tokuhirom Having C++ support would be nice - but I definitely don't want to lose C support. |
|
You can support both language by command line options like |
Member
|
I don't think that's a big deal - you can still compile the C code as a module and use it from C++.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hi,
thought you might be interested
properly cast void* to target pointer type (a c vs c++ difference)
added yyinit that zeroes GREG struct
added yydeinit that frees GREG->buf etc.
fixed yyfree by using yydeinit
added make test target
refreshed greg.c