Compare commits
	
		
			1 Commits
		
	
	
		
			master
			...
			2025-predr
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					352085b499 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -3,4 +3,3 @@ out/
 | 
			
		||||
*.zip
 | 
			
		||||
prg/**/*.ast
 | 
			
		||||
prg/**/*.out
 | 
			
		||||
prg/**/*.pins25
 | 
			
		||||
							
								
								
									
										26
									
								
								grammar.txt
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								grammar.txt
									
									
									
									
									
								
							@ -69,4 +69,28 @@ restinits -> COMMA initializer restinits | .
 | 
			
		||||
initializer -> INTCONST intconstmult | CHARCONST | STRINGCONST .
 | 
			
		||||
intconstmult -> MUL const | .
 | 
			
		||||
 | 
			
		||||
const -> INTCONST | CHARCONST | STRINGCONST .
 | 
			
		||||
const -> INTCONST | CHARCONST | STRINGCONST .
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
--------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
//LEFT ASOC.
 | 
			
		||||
exp0 = exp0 op other | other
 | 
			
		||||
 | 
			
		||||
    |
 | 
			
		||||
    v
 | 
			
		||||
 | 
			
		||||
exp0  = other exp0'
 | 
			
		||||
exp0' = op other exp0' | .
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//RIGHT ASOC.
 | 
			
		||||
exp0 = other op exp0 | other
 | 
			
		||||
 | 
			
		||||
    |
 | 
			
		||||
    v
 | 
			
		||||
 | 
			
		||||
exp0  = other exp0'
 | 
			
		||||
exp0' =  op exp0 | .
 | 
			
		||||
							
								
								
									
										5
									
								
								prg/test.pins25
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								prg/test.pins25
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
			
		||||
// line1 --
 | 
			
		||||
line2 -----x
 | 
			
		||||
line3
 | 
			
		||||
 | 
			
		||||
fun main() = 0
 | 
			
		||||
@ -247,7 +247,13 @@ public class LexAn implements AutoCloseable {
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                while (buffChar != '\n' && buffChar != -1) {
 | 
			
		||||
                StringBuilder builder = new StringBuilder();
 | 
			
		||||
                
 | 
			
		||||
                while (buffChar != -1) {
 | 
			
		||||
                    if (buffChar == '\n' && !builder.toString().endsWith("--")) {
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
                    builder.append((char) buffChar);
 | 
			
		||||
                    nextChar();
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user