mirror of
https://github.com/PDP-10/its.git
synced 2026-05-03 14:49:18 +00:00
Edit SAIL files to be like the originals from ITS.
Rename according to SAIL file C.LIB[C,SYS]. Fix E stuff and remove trailing ^C and ^@s.
This commit is contained in:
17
src/c/expr2.grammr
Normal file
17
src/c/expr2.grammr
Normal file
@@ -0,0 +1,17 @@
|
||||
'+' '-' '*' '/' '(' ')' int
|
||||
|
||||
\< '+' '-'
|
||||
\< '*' '/'
|
||||
|
||||
\\
|
||||
|
||||
s: e {printf (1, "%d\n",#1);}
|
||||
e: e '+' e {val = #1 + #3;}
|
||||
| e '-' e {val = #1 - #3;}
|
||||
| e '*' e {val = #1 * #3;}
|
||||
| e '/' e {val = #1 / #3;}
|
||||
| p
|
||||
|
||||
p: '-' p {val = - #2;}
|
||||
| '(' e ')' {val = #2;}
|
||||
| int
|
||||
Reference in New Issue
Block a user