p4lang-p4c-nightly:fix-lexer-linenumbers

Last commit made on 2019-03-25
Get this branch:
git clone -b fix-lexer-linenumbers https://git.launchpad.net/p4lang-p4c-nightly

Branch merges

Branch information

Name:
fix-lexer-linenumbers
Repository:
lp:p4lang-p4c-nightly

Recent commits

1a24cd0... by Antonin Bas <email address hidden>

Handle @max_group_size annotation when generating P4Info

This annotation is standardized by the P4Runtime specification and
enables the P4 programmer to specify the maximum group size (sum of
weights across all members in a group) for a given v1model / PSA
action selector.

694b668... by Mihai Budiu <email address hidden>

Add canonical base types to typemap; fixes #1806 (#1812)

* Add canonical base types to typemap; fixes #1806

288669d... by ChrisDodd

Fix P4 code output (#1816)

- only output full struct decl with declaration -- uses just use name
- squash symlinks when looking for #include possibilities

f703524... by Calin Cascaval <email address hidden>

extracting metadata is a user error not a compiler issue (#1810)

953ab98... by ChrisDodd

Refactor GeneralInliner common code (#1820)

- template combining P4Control and P4Parser inlining
- extend avoidance of unnecessary copying to parser inlining

16cf341... by Calin Cascaval <email address hidden>

add a bound to the number of errors that are printed before exiting (#1817)

add a bound to the number of errors that are printed before exiting

The compiler error reporting is based on the principle that printing
as many errors as possible will allow users to fix multiple of them in
a single compilation pass. However large number of errors is usually
too hard to handle, and people will incrementally fix errors as they
go. What is that magic number? Clang uses 20, which seems quite
reasonable, so we use that as a base.

We also provide the `ErrorReporter::setMaxErrorCount` function, so
that different backends can chose their own threshold matching their
user's expectations.

And finally, a bit more cleanup to remove redundancies in the error
reporting code. The main reason for splitting error_helper and
bug_helper functions into a separate header is to avoid circular
include dependencies:
error.h -> error_reporter.h -> exceptions.h -> error.h

* add argument to set maxErrorCount and use it for tests that exceed the limit

fe90bb9... by Alex Wong <email address hidden>

Fix issue with bmv2 psa_switch backend not able to reference the new metadata (#1815)

* Reorder code so we actually add metadata and allow referencing, fix zeroes appearing for errors and bool in json

* Refactor isStandardMetadata

* Change log strings

* Remove unncessary changes and extra spaces

* Clean up log messages

900557c... by Antonin Bas <email address hidden>

Update IR::Constant::toString to print the base

bcaedfe... by Antonin Bas <email address hidden>

Make --p4runtime-entries outputs more conformant to P4Runtime spec

See #1805

 * omit don't care matches
 * toggle off value bits which are masked off for ternary and LPM
 * emit a warning for ignored @priority annotation, and generate correct
   priority values
 * I couldn't move to the canonical binary string representation for
   bit<W> values because it is not currently supported by p4lang/PI

212b3e1... by Han Wang <email address hidden>

allow custom typechecker in SimplifyDefUse pass (#1807)