hi guys,

in the context of a C like language, how do i parse/lex a signed
literal? eg: "-1".  (speech marks excluded)

in the lexer, i can't tell if we're in an expression  eg:  "2-1"  or
if we're in assigment: "int x=-1".  i've studied the freely available
C grammar for hints, but can't find an answer.  in know of at least
one language that avoids this problem by using '_' instead of '-'.


ta, jack


_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to