Skip to content
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

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

shevek
Copy link
Owner

@shevek shevek commented Nov 27, 2014

I hope this PR ends up on JCPP, not on mimuw!

grzegorz8 and others added 27 commits January 12, 2014 11:00
…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.
@ooxi
Copy link

ooxi commented Nov 27, 2014

Thanks for your effort! It's really great to see that each and every one of your commit seems to be cherry picked. But since Github only allows integrating the hole pull request at once (afaik) it would be great if you could open multiple pull requests (one for each type, maybe even every commit).

That way it would be much easier to investigate your changes and thus accept them :)

Edit: Damn it, I didn't see that it's you @shevek :D nevertheless great job!

@shevek
Copy link
Owner Author

shevek commented Nov 27, 2014

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants