-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR for commits from mimuw-distributed-systems-group #22
base: master
Are you sure you want to change the base?
Conversation
Conflicts: gradle/check.gradle
…ssor directives. Support for conditional directives is on the way.
Gathering PreprocessorDirective instances generated during parsing should work properly now and handle all preprocessor directives. Changes to the way the directives are gathered and stored will only extend the currently available functionality.
Update PreprocessorListener to be an interface. Make Source.getName() public. Conflicts: build.gradle gradle.properties gradle/buildscript.gradle
Bugs introduced to the PreprocessorDirective gathering process have been resolved. Additionally the listener was expanded to allow for gathering information on macro instantiation.
The preprocessor entered into an infinite loop if an unclosed C style comment was detected. Now if an INVALID token is to be generated by the LexerSource, information on what Token type was expected is also returned.
Previously all invalid tokens had expected type string instead of e.g. character. Error messages were also misleading.
Saving locations of macros definitions in new fields in Macro class. In addition, PreprocessorListener.handleMacroExpansion gets information about location of the definition of the macro that is expanded if it is available.
Tokens that come from a macro definition have now their position set to the macro identifier that is expanded.
Token has new field 'originalMacroToken' that can indicate the token with a macro identifier that has been replaced by it. Tokens that are returned because of a macro expansion (but other than predefined macros) have this field properly assigned. Their positions are not changed anymore.
Original tokens should be assigned to tokens properly in all cases. Token class has been enriched by implementing 'Cloneable' interface.
Tokens that come from the use of the stringize operator ('#') in a macro definition have set the 'isStringized' flag in Token class. Moreover, these tokens carry accurate information about their original token and position. Furthermore, tokens that are result of using the concat operator ('##') have the macro identifier from the earliest macro use that is currently processed as their original token.
…de() Bump to version 1.5.0
Edit: Damn it, I didn't see that it's you @shevek :D nevertheless great job! |
@ooxi Thank you! Since the PR will track the difference between the two masters, I'm really cheating and using github as a live diff view between the two trees. I don't plan to merge this PR, I just plan to work until it's minimized, then close it. I tend to have Opinions about how things should be done, so I read carefully before I adopt to master. |
I hope this PR ends up on JCPP, not on mimuw!