Skip to content
Signalcrest
Back to feed
stackoverflowdevtools

How can ANTLR4 distinguish hyphenated identifiers from subtraction expressions?

Explains lexer rules to differentiate hyphenated identifiers from subtraction in ANTLR4.

Steady
Signal score
15
as of 50d ago
Trajectory
⏳ Too early
needs a few more snapshots

Why this scored 15

every term, weighted
Velocity+0.0 / 40

Engagement gained per hour since the last capture, against the fastest item on its own source

Acceleration+12.0 / 25

Whether that velocity is itself speeding up, as a per-hour rate

Cross-source spread+0.0 / 25

How many independent communities are talking about the same entity

Recency+5.0 / 10

Decays to zero over 14 days

Saturation penalty−1.7 / 30

Subtracted once something is big and old — we rank what's next, not what's peaked

Composite15.3

Weights are hand-tuned, not learned — we're calibrating them against realized trends as history accumulates. On a topic's first sighting there's no previous reading to compare against, so acceleration starts from a neutral prior rather than a measurement, and velocity falls back to engagement over its whole lifetime until a second reading exists. Full methodology

Signal history

7-day window (free)
Not enough history yet — the trend line fills in as snapshots accrue (every 30 min).

Entities

antlr4
Embed a live signal badge
Signalcrest signal badge
[![Signalcrest signal](https://www.signalcrest.app/api/badge/so%3A80007036)](https://www.signalcrest.app/topic/so%3A80007036)

Drop this in a README or blog post — it updates automatically as the score moves.